http://qs321.pair.com?node_id=456389


in reply to Re^2: HTML::Template recalling selected dropdown options
in thread HTML::Template recalling selected dropdown options

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
indistinguishable from doubletalk.

My Biz