Sometime on Aug 13, Fran Fabrizio assembled some asciibets to say:

> <input type=text name=computer_1_name>
> <input type=text name=computer_1_ip_address>
> <input type=text name=computer_2_name>
> <input type=text name=computer_2_ip_address>

This is what I do, although I use it in a form to add authors to a
publication.

<tmpl_loop computers>
<input type=text
        name="computer_<tmpl_var index>_name"
        value="<tmpl_var value>">
<tmpl_if error><span class="error><tmpl_var error></span>
</tmpl_loop>

This will not work with associate, but it's pretty simple to populate
the template:

my @computers;
for(my $i=0; defined($cgi->param("computer_${i}_name")); $i++) {
        my %computer = (
                index => $i,
                value => $cgi->param("computer_${i}_name"),
                error => check_param(...)
        );

        push @computers, \%computer;
}

$template->param(computers => \@computers);


-- 
It's hard to get ivory in Africa, but in Alabama the Tuscaloosa.
                -- Groucho Marx



-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31
_______________________________________________
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users

Reply via email to