I'm really keen on getting an OPTGROUP into the SELECT element. Browsing through the sources of both ChronoForms and Joomla, there seems to be a way. However I cannot get it to work. 😢 Here's what I've found:
1) In the Form Wizard I've added a DropDown and set the Options field to this:
2) After saving the form and reviewing the output the HTML is generated as such:
It appears somewhere in the php code a "optgroup" is recognized, since it is generated into html. :?
3) The following stacktrace may give a clue to where parsing is performed:
Although I've found the code lines responsible for generating the html output, I cannot make out how to tweak the code or input to build a proper OPTGROUP into the SELECT element.
If anyone with more experience can help out, it would be greatly appreciated.
Thanks in advance. 🙄
1) In the Form Wizard I've added a DropDown and set the Options field to this:
option 1
<OPTGROUP>,Blah
option 2
option 2b
</OPTGROUP>
option 3
2) After saving the form and reviewing the output the HTML is generated as such:
<select name="select_5" title="" size="1" id="select_5" class="cf_inputbox">
<option value="">Choose Option</option>
<option value="option 1">option 1</option>
<option value="<OPTGROUP>,Blah"></option>
<optgroup></optgroup>
<option value="option 2">option 2</option>
<option value="option 2b">option 2b</option>
<option value="</OPTGROUP>"></option>
<option value="option 3">option 3</option>
</select>
It appears somewhere in the php code a "optgroup" is recognized, since it is generated into html. :?
3) The following stacktrace may give a clue to where parsing is performed:
* ChronoForms\admin\helpers\plugin.php : line 271
* http://api.joomla.org/__filesource/fsource_Joomla-Framework_HTML_joomlahtmlhtmlselect.php.html#a151
* http://api.joomla.org/__filesource/fsource_Joomla-Framework_HTML_joomlahtmlhtmlselect.php.html#a64
Although I've found the code lines responsible for generating the html output, I cannot make out how to tweak the code or input to build a proper OPTGROUP into the SELECT element.
If anyone with more experience can help out, it would be greatly appreciated.
Thanks in advance. 🙄