Spidy has asked for the wisdom of the Perl Monks concerning the following question:
For a recent project, users are encouraged to fill in a form with a varying number of fields - all of the fields have the same basic premise(being an answer to a question), but need to have some sort of way for me to retrieve all of them using CGI.pm. Users are able to dynamically add fields(which would also mean dynamically naming them), up to a possible limit of infinity or so. I know that I could name the fields 'answer<foo>', where <foo> is a number from 1..infinity and then just retrieve all of them, but I'm wondering: is there a better way that I can organize and retrieve these values? In my mind I'm thinking of an array of some sorts, but I'm not sure if that's actually possible.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Organizing Form Input
by suaveant (Parson) on Feb 23, 2007 at 16:27 UTC | |
|
Re: Organizing Form Input
by andyford (Curate) on Feb 23, 2007 at 21:44 UTC | |
|
Re: Organizing Form Input
by blue_cowdawg (Monsignor) on Feb 23, 2007 at 16:59 UTC | |
|
Re: Organizing Form Input
by Herkum (Parson) on Feb 23, 2007 at 16:11 UTC | |
by Spidy (Chaplain) on Feb 23, 2007 at 19:30 UTC | |
|
Re: Organizing Form Input
by andyford (Curate) on Feb 23, 2007 at 16:30 UTC | |
by dsheroh (Monsignor) on Feb 23, 2007 at 16:40 UTC | |
|
Re: Organizing Form Input
by graff (Chancellor) on Feb 24, 2007 at 16:36 UTC | |
by Spidy (Chaplain) on Feb 24, 2007 at 17:43 UTC | |
by graff (Chancellor) on Feb 24, 2007 at 22:28 UTC |