I need to edit a Custom Field Type (which is greyed out) from Numeric to something that allows me to enter 8 numeric digits only. Currently, it adds a comma. I guess I need integer or something. Thanks!

1 Answer 1


It's greyed out because changing the type could create lots of issues. Instead, create a new field of the right type and copy existing data to it.

If you use Alphanumeric you can set the Database Field Length to 8. That will limit it to 8 characters. If you want to enforce the digits only restriction then try hook_civicrm_validateForm - see the example on that page.

  • Worked perfect! I simply deleted the field and then redid it with your recommendations! Thanks! May 20, 2022 at 17:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.