Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: How do I select an option according to a specified value in HTML::Template::Pro?

by tinita (Parson)
on Aug 11, 2011 at 11:22 UTC ( #919848=note: print w/replies, xml ) Need Help??


in reply to How do I select an option according to a specified value in HTML::Template::Pro?

Just for the records, if you have the possibility to use HTML::Template::Compiled and the plugin HTML_Tags:
Template:
<tmpl_html_option province>

Perl:
$htc->param( province => [ 'opt_2', # selected ['opt_1', 'option 1'], ['opt_2', 'option 2'], ], );
Output:
<option value="opt_1">option 1</option> <option value="opt_2" selected="selected">option 2</option>

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://919848]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2017-04-24 04:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (433 votes). Check out past polls.