in reply to textarea entries

Are you talking about a web interface here? Just make a single, large-enough text box that people can type/paste into (like the ones here for posting nodes and replies), and break up the submitted text on whitespace.

If the values need to be "keyed" in some way (e.g. they need to be submitted in a particular order, or each value needs a label to identify what it's for), and/or if any single value can contain a space, then you'll need to work out a convention that will keep the input properly organized and still be easy for users to grasp and adhere to.

If you don't get what you're after, post some code -- that makes it easier and more fun for us.

Replies are listed 'Best First'.
Re^2: textarea entries
by TeaK (Initiate) on Feb 23, 2005 at 17:48 UTC
    Thank you for your replies... I want a simple textarea where the users can paste in many serial numbers (either in a column or row with a space/s sepating them). They click submit and the CGI takes each entry as a separate entity instead of one long one. I admit it I am a CGI rookie here.... I need a snipet or 2 to see what you are saying. If I show you what I have for the current code to accept the <input type text> entries. Could you suggest the best method to read a textarea instead of multiple text fields. Feel free to alter this code . Thank you in advance
    #!/usr/bin/perl if ($ENV{'REQUEST_METHOD'} eq 'POST') { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $FORM{$name} = $value; } &process; } #The following displays barcode sub process { ($name = $FORM{name});
    more html & print script would be below here Once again I thank you gc