Thanks, punkish!
I did a dump of @options.
# 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>
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.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|