Re: [cgiapp] Dropdown Menu

2010-04-15 Thread Mike Tonks
I find it works pretty well using TMPL_LOOP and an array of hashref's from the db - I loop through the data array and set the 'Selected' item before passing into the template, like so: in the viewer module: my $product_types = $self-dbh-selectall_arrayref(select * from product_type where

[cgiapp] Dropdown Menu

2010-04-14 Thread Adam
I want to have a dropdown menu that shows years 2000 thru 2015. I'm using HTML::Template and I know I can pass an array ref to HTML::Template and loop over it to make the menu, but how would I put in a selected year? What's the best method? The selected year would be decided at runtime. #