I did a dump of @options.
The above works with the template but I'm not sure if I'm missing something. Note that %hash is passed to &generate (thanks to djantzen for the map) which generates a list which is then supplied to the param of H::T.# This dumped output of options is #$VAR1 = { 'school' => 'Admiralty Primary', 'school_id' => '1' }; #$VAR2 = { 'school' => 'Ahmad Ibrahim Primary', 'school_id' => '2' }; #$VAR3 = { 'school' => 'Anderson Primary', 'school_id' => '3' }; # the relevant template is # note that the school_id in <select name="school_id"> is # hard-coded whereas the one in <tmpl_var name=school_id>"> # is a number supplied via @options <select name="school_id"><option selected value="1"><option selected v +alue="0">Select<tmpl_loop name=options> <option value="<tmpl_var name=school_id>"><tmpl_var escape=html name=s +chool></option></tmpl_loop> </select></td></tr>
In reply to Re: Re: HTML::Template question - tmpl_if
by kiat
in thread HTML::Template question - tmpl_if
by kiat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |