CiviCRM will only let you edit certain properties of a field after it’s been created. Namely, although you can edit things like the field label and the options set mapped to that field, you can’t edit the data and input field type.
The corresponding field is greyed-out and unselectable on the custom fields list, as shown below:
Now this is understandable to a degree – once you’ve created a field in the database and inserted some data into it, you wouldn’t expect to e.g. change a int datatype into a datetime, or alphanumeric datatype. However, what is slightly annoying is that CiviCRM ties you in not only to the datatype used to store data in the backend database, but also the front-end widget used to input that data in the CiviCRM interface.
In my case, I had a (multiple) checkbox that I wanted to change into a (multiple) select list – with no underlying changes to the type of data, or range of possible values that could be stored in that field – I just wanted to change the front-end widget, and there didn’t seem to be any way to do this in CiviCRM itself short of dropping the field (and all the data held in it) and recreating a new field.
Fortunately, editing the database table directly as follows seemed to do the trick, and hasn’t (yet) to any unwanted side-effects:
UPDATE civicrm_custom_field SET 'html_type' = 'Multi-Select' WHERE 'name' = 'Ward'
Hello,
I have the same problem and I dont know how to change the type of the field.
Can u explain for me more?
thanks
This worked great for me. You can edit basically all the attributes of your custom fields by altering this table. Remember to back up your table before you play!