aptom has asked for the wisdom of the Perl Monks concerning the following question:
Hi All,
just started playing with Template Toolkit.
I cannot seem to put an array ref within a form field.
e.g.
the output contains no values for the option tags.in parent script my @bob = qw( 1 9 3 4 5 ); my $vars = { cgi => CGI->new(), array_ref => \@bob }; $tt->process('main_form.tt', $vars) || die $tt->error(), "\n"; =============================================================== in template (main_form.tt) [% cgi.scrolling_list({ name => 'languages', values => $array_ref }) %]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Template Toolkit and Array Refs in Form
by almut (Canon) on Jul 16, 2010 at 07:38 UTC | |
by aptom (Novice) on Jul 18, 2010 at 23:07 UTC |