I would also recommend HTML::FillInForm. Sample code below.
my $tmpl = HTML::Template->new(filename => 'app_personal.tmpl',
associate => [$session,$q],
cache => 0,
);
my $output = $tmpl->output();
my $fif = new HTML::FillInForm;
print $fif->fill(scalarref => \$output,
fdat => $hr,
);
----- Original Message -----
From: "Phil Taylor" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 21, 2001 4:30 AM
Subject: [htmltmpl] setting the SELECTED item in a SELECT list
> Is there a standard approach to creating SELECT lists with the
HTML::Template module?
>
> I have a problem creating SELECT lists with HTML::Template. I can create
the list no problem using the LOOP construct but I want to set the SELECTED
item in the list based on what they may have previously selected if the
associated entry form is re-displayed. I don't see any way that the
HTML::TEMPLATE module can handle this? My only current alternative is to
build the entire HTML <SELECT>...</SELECT> component in my application and
pass this as a template parameter. I'm not too happy with this as I start to
lose the separation between business logic and presentation.
>
> I would be really grateful for any thoughts on this.
>
> Phil
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]