1

One of my fields is a channel in a select dropdown. Can I add option groups in

Jumpstart > CP > Home > Administration > Channel Fields >Edit Field ?

<select>
  <optgroup label="Swedish Cars">
    <option value="volvo">Volvo</option>
    <option value="saab">Saab</option>
  </optgroup>
  <optgroup label="German Cars">
    <option value="mercedes">Mercedes</option>
    <option value="audi">Audi</option>
  </optgroup>
</select>
1

Not with the native select drop down, no. But, you can do it with the select field from Pixel & Tonic's Field Pack add-on. See the docs for details.

1
  • caveat: channel in a select dropdown (e.g. i'm guessing the option: Populate the menu from another channel field) – GDmac Mar 28 '14 at 8:29
1

If you mean the option groups in combination with: Populate the menu from another channel field, then you would need to modify and customise a fieldtype. Something that makes a dropdown from a table, and modify the fieldtype to make option groups based on category, tags or whatever.

Some starting points to build a custom fieldtype of:

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.