techcode has asked for the wisdom of the Perl Monks concerning the following question:
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 ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Populating options in html select.
by wfsp (Abbot) on Sep 29, 2005 at 04:33 UTC | |
|
Re: Populating options in html select.
by jbrugger (Parson) on Sep 29, 2005 at 04:34 UTC | |
|
Re: Populating options in html select.
by Zed_Lopez (Chaplain) on Sep 29, 2005 at 06:26 UTC | |
|
Re: Populating options in html select.
by techcode (Hermit) on Sep 29, 2005 at 14:48 UTC | |
|
Re: Populating options in html select.
by rhesa (Vicar) on Oct 11, 2005 at 12:41 UTC | |
|
Re: Populating options in html select.
by NetWallah (Canon) on Nov 03, 2005 at 21:37 UTC |