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

CGI::FormBuilder seems popular but not quite right in TT:

  http://template-toolkit.org/pipermail/templates/2002-January/002353.html

Any comments on CGI::FormBuilder?

My goal is to quickly generate a very basic form that is easy for others
to edit.

I like a plain simple HTML form with only a few TT tags that is processed
by HTML::FillInForm -- seems that's the easiest format for others to edit.
But I don't like generating that form in the fist place.

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>


And then have things like:

[% BLOCK radio_options %]
[% INCLUDE check_and_warn_missing_field %]
<blockquote>
   <table border="0"><tr>
   [% FOR option = options %]
       <td>
           <input type="radio" name="[% name | html %]" value="[% option | html %]" 
/>[% option | h$
       </td>
   [% END %]
   </tr></table>
</blockquote>
[% END %]

[% BLOCK check_missing %]
    [% IF missing.$name %]
        <br><font color="red">[% missing.$name %]</font><br>
    [% END %]
[% END %]


I'm wondering if the best would be to use TT generate a TT source
file as plain old HTML form.  Anyone doing that?

So, any suggestions?

Thanks,

-- 
Bill Moseley
[EMAIL PROTECTED]


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

Reply via email to