I know about HTML::FillInForm and other modules with similar functionality. But I haven't found any that would beside selecting right option in a <select> also dynamically make those.
To make it more clear. Inside my template (HTML::Template)
<select name="whatever"> Insert possible options here and of course select the right one </select>
Another solution would be :
But then I end up with HTML generating code - which means I have html code inside my Perl code ...<select name="whatever"> <!-- TMPL_VAR NAME="whatever_select" --> </select>
Also looks kinda funky :) And it also requires work inside my code.<select name="whatever"> <!-- TMPL_LOOP NAME="whatever_select" --> <option value="<!-- TMPL_VAR NAME="id" -->" <!-- TMPL_VAR NAME="checke +d" -->><!-- TMPL_VAR NAME="value" --></option> <!-- /TMPL_LOOP --> </select>
I was thinking of simply passing array(ref) of possible values that would be used for filling options. And then HTML::FillInForm would easily select right option. Any module that does that? If not, I might try to write it myself - but I'm not that good with parsing ...
In reply to Populating options in html select. by techcode
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |