Title: Add optgroup
Last modified: September 16, 2016

---

# Add optgroup

 *  [d10gen3](https://wordpress.org/support/users/d10gen3/)
 * (@d10gen3)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/add-optgroup/)
 * The plugin works great. I was wondering if it could be added an improvement to
   include optgroup tag. It should be directly from the $choices variable:
 * $choices = array(
    ‘– Make a Selection –‘ => ”, value_1 => array( ‘Element 1’,‘
   optgroup_1’ ), value_2 => array( ‘Element 2’, ‘optgroup_1’ ), value_3 => array(‘
   Element 3’, ‘optgroup_1’ ), value_4 => array( ‘Element 4’, ‘optgroup_2’ ), value_5
   => array( ‘Element 5’, ‘optgroup_2’ ), value_6 => array( ‘Element 6’, ‘optgroup_3’),
   value_7 => array( ‘Element 7’, ‘optgroup_3’ ), );
 * This could also lead to improve the dropdown adding the possibility of more customisation
   for each element:
 *  value => array( ‘Label’, ‘optgroup’, ‘class string’, ‘id’, ‘javascript’ ),
 * Thanks in advance for your great plugin.

Viewing 1 replies (of 1 total)

 *  Plugin Author [John Huebner](https://wordpress.org/support/users/hube2/)
 * (@hube2)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/add-optgroup/#post-8205831)
 * I don’t know if I can do this, or do it exactly this way or not.
 * Can you pop over to github and add this to the issues and I’ll look at it as 
   when I have time [https://github.com/Hube2/contact-form-7-dynamic-select-extension/issues](https://github.com/Hube2/contact-form-7-dynamic-select-extension/issues)

Viewing 1 replies (of 1 total)

The topic ‘Add optgroup’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/contact-form-7-dynamic-select-extension.
   svg)
 * [Dynamic Select for Contact Form 7](https://wordpress.org/plugins/contact-form-7-dynamic-select-extension/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7-dynamic-select-extension/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7-dynamic-select-extension/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7-dynamic-select-extension/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7-dynamic-select-extension/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7-dynamic-select-extension/reviews/)

## Tags

 * [custom](https://wordpress.org/support/topic-tag/custom/)
 * [dynamic select](https://wordpress.org/support/topic-tag/dynamic-select/)
 * [optgroup](https://wordpress.org/support/topic-tag/optgroup/)
 * [select](https://wordpress.org/support/topic-tag/select/)

 * 1 reply
 * 2 participants
 * Last reply from: [John Huebner](https://wordpress.org/support/users/hube2/)
 * Last activity: [9 years, 7 months ago](https://wordpress.org/support/topic/add-optgroup/#post-8205831)
 * Status: not resolved