Subject: | No access to optgroup in CGI::FormBuilder::Template::HTML |
CGI::FormBuilder::Template::HTML lets one loop through all options in a select, for example, <tmpl_loop loop-color> to loop through all the options of the "color" field.
Inside that loop you can get each options value, label, and "checked" or "selected", but not the optgroup, or optgroup-begin & -end flags.
Line 125 of FormBuilder/Template/HTML.pm has:
my($o,$n) = optval $opt;
It seems the group would be available by as a 3rd return value-
my($o,$n,$g) = optval $opt;
and then added to @tmpl_loop a few lines below.
Yes, I have a use for that!