<input type="radio" name="Color" value="Red" <!--TMPL_VAR NAME=Red -->">
<input type="radio" name="Color" value="Blue" <!--TMPL_VAR NAME=Blue -->">
But the above is really ugly, and I gotta believe there's a better approach (that I'm too dense to recognize)
Yeah, I know, it seems like there should be a better solution. In fact, due to the limitations of HTML, there are only a series of equally sucky solutions. What you have above is as good as any. Blame W3C.
I would recommend checking out HTML::FillInForm for your situation - it'll take care of those radio buttons and select boxes, since you're rehashing the same form if you didn't receive valid input.
Something like this un-tested code:
# You're processing the input from the form... if ( bad_input( $query ) ) { $template = HTML::Template->new( 'filename' => 'previous_steps_template.TMPL', 'die_on_bad_params' => 0, );
$fif = HTML::FillInForm->new;
print $fif->fill( 'scalarref' => $template->output, 'fobject' => $query );
exit; }
You'll be amazed how cool FillInForm will work ... you won't need to do that TMPL_VAR stuff inside the form fields ... FillInForm will handle all that for you.
HTH,
Jason
------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ Html-template-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/html-template-users