Bill Moseley wrote:
I still don't like writing forms.  Anyone have a system they like?
I keep thinking there must be something better.

Looking through various projects I've done many different things.  For
example I see things like this:

<table>
[% INCLUDE text_field label = "First Name" name = "first" %]
[% INCLUDE text_field label = "Last Name" name = "last" %]
[% INCLUDE check_box label = "Do you want spam?" name = "spam_me" %]
[% INCLUDE radio_options
       name = 'This form is'
       options = [ 'Too easy', 'Too hard', 'Just right']
%]
</table>

I prefere the syntax given by MACRO. With macros, the blocks can be replaced with exported Perl functions.


I have things like [% radio( field, value, current ) %], with optional and default values. set from the query object. Extra parameters can be given after the parameter list.


-- / Jonas - http://jonas.liljegren.org/myself/en/index.html

_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to