Import multiple selections
Create the Custom Field
Start by creating your custom field.
- Go to Administer > Customize Data and Screens > Custom Fields.
- Create a new Custom Field set if needed.
- Add a Custom Field.
- In the Data and Input Field Type section, choose the Select option.
- In the Multiple Choice Options section, create a couple of entries.
Now access your database using your preferred MySQL console (I'm using phpMyAdmin). It's a good idea to backup your database before using phpMyAdmin to make changes.
- Browse to the civicrm_option_group table.
- Note the id number of your recently created Option Group.
- Browse to the civicrm_option_value table.
- Here you will see the two entries that you made in the previous section.
- Create a .CSV spreadsheet of the values that you'd like to import. Include the following columns:
- value (this is the unique number in your current database).
- weight (this is the sort order)
- is_active (presumably all value 1)
- Note that I find it simpler if I delete the first row column headers.
- Select the Import tab.
- Browse to your newly created .CSV file
- Uncheck the Enable foreign key checks checkbox.
- In the Column names field, enter your comma separated columns (e.g. option_group_id, label, value, name, weight, is_active).
- Click Go.
Thanks for visiting.