monkfan has asked for the wisdom of the Perl Monks concerning the following question:
Update: Corrections added thanks to friedo#!/usr/bin/perl -w use strict; use diagnostics; use Data::Dumper; use CGI qw/:standard :html3/; use CGI::Carp qw( fatalsToBrowser ); my $nbr_of_fields = 15; # This is taken as user input print start_form(),br; for (0..$nbr_of_fields-1) { # This doesn't print print textfield(-name=>'field_name', -value=>'starting value', -size=>50, -maxlength=>80); } print submit( -name=>'action', -value => 'Submit' ), end_form; # And how can I later capture the values?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Creating multiple textfields with for loops and capturing its values with CGI.pm
by Samy_rio (Vicar) on Jun 15, 2006 at 04:08 UTC | |
|
Re: Creating multiple textfields with for loops and capturing its values with CGI.pm
by friedo (Prior) on Jun 15, 2006 at 03:55 UTC |