1

I'm trying to create an option group for a custom data field. It needs to be a multi-select dropdown. How can I build in CiviCRM

Eg

<select>
  <optgroup label="Accommodations">
    <option value="Bed & Breakfasts">Bed &amp; Breakfasts</option>
    <option value="Camping">Camping</option>
  </optgroup>
  <optgroup label="Arts & Crafts">
    <option value="Artisans">Artisans</option>
    <option value="Artists">Artists</option>
  </optgroup>
</select>
  • agree with Aidan - can you clarify why just adding these via Custom Field isn't an option. mostly folk would 'add custom field' and within that choose eg 'select' and then create their options – petednz - fuzion Feb 12 at 19:39
1

Are you trying to add these in an extension? If so, see adding custom fields with civix which suggests creating them via the GUI then exporting them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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