P is for Practical | |
PerlMonks |
Re^3: HTML::Template recalling selected dropdown optionsby Hero Zzyzzx (Curate) |
on May 12, 2005 at 13:49 UTC ( [id://456389]=note: print w/replies, xml ) | Need Help?? |
popup_menu() (and checkbox_group(), radio_group(), etc) can absolutely simplify your templates, on large forms you'll see a huge difference. Personally I haven't often had the need to edit form fields directly as HTML, because you can apply a class to the field and change much of it's appearance with CSS. Most field options are created off database queries, seldom are select/radio/check lists hardcoded. I only use CGI.pm to parse values, print headers, handle uploads and create HTML Forms (though I've started to use CGI::FormBuilder for most of my forms). On trivial apps I'll use the HTML generation features, too. For me, I think this is CGI.pm's "highest and best" use- the tricky stuff that doesn't usually impact design is handled by a library that does it EXTREMELY well. The way I think of it- you can absolutely save yourself time generating the HTML form fields with CGI, and in those cases where you just can't because of some design problem (which is pretty rare, in my experience), you can always fall back to manual form element generation. In the meantime, you've still come out ahead, with smart forms and saved effort. -Any sufficiently advanced technology is
In Section
Seekers of Perl Wisdom
|
|