Re: populating dropdown box from db

Aaron Trevena <[email protected]> Thu, 17 May 2012 11:46:43 +0100
Newsgroups gmane.comp.lang.perl.modules.template-toolkit
Message-ID <CAJWQ4V2vUTwws0EKE5N=gGh==TQWuzte-8cyL+Y-nFkdpVWqNw@mail.gmail.com>
On 9 May 2012 17:22,  <eric.berg-W7cInXPOPQlWk0Htik3J/[email protected]> wrote:
> Use the TT wrapper for the CGI module and simply pass in an array of values and a hash of value => label pairs as per the docs. Check the docs for CGI as well as the TT CGI plugin.
> [ 500 lines of untrimmed top-post ]

Or you could go the whole hog and use
https://metacpan.org/release/HTML-FormHandler - this provides nice
looking forms (that work nicely with twitter bootstrap to look really
nice), and will also provide validation and integrate into DBIx::Class
or database queries to fetch the data from the database. H::FH also
gives you the option of templating each field or form yourself or
"rendering" the whole form in one function call, or just some of the
fields. Definately recommended.

regards,

Aaron

-- 
Aaron J Trevena, BSc Hons
http://www.aarontrevena.co.uk
LAMP System Integration, Development and Consulting