Re: passing variables from one form to another using Perl

by "Jan Morell" <jan_man(at)bellsouth.net>

 Date:  Wed, 27 Dec 2000 15:09:44 -0500
 To:  "Franklin,
Douglass" <Douglass.Franklin(at)ssa.gov>,
<hwg-languages(at)hwg.org>
 References:  ssa
  todo: View Thread, Original
Sure Doug,

The second page is being generated by a CGI. The section in question is
below:

Here are the variables:

$ON = $field{'ON'} ; #Category
$Sub = $field{'Sub'} ; #Sub-Category
$S1 = $field{'S1'} ; #Question

Here is the section where I am trying to insert them:  ( into data0, data1,
and data2) *note:  There might be some word wrapping here. (In this example
I had tried single quotes.)

print '                                      <input type="text" name="data0"
value=\'$ON\'>'."\n" ;
print "                                    </p>\n" ;
print "                            </td>\n" ;
print '                                  <td width="334"> <font
face="verdana, arial, helvetica" size="2" color="#000080"><b>Subcategory
'."\n" ;
print "                                    </b></font> \n" ;
print '                                    <input type="text" name="data1"
value=\'$Sub\'>'."\n" ;
print "                                  </td>\n" ;

------------SNIP-------------------------

print "                                      The more information you give
us,&nbsp;<br>\n" ;
print "                                      the faster and more accurate
our response \n" ;
print "                                      will be.<br>\n" ;
print '                                      <textarea rows="2" name="data2"
cols="54">\'$S1\'</textarea>'."\n" ;


If you need any other information, let me know.

Jan


----- Original Message -----
From: "Franklin, Douglass" <Douglass.Franklin(at)ssa.gov>
To: "'Jan Morell'" <jan_man(at)bellsouth.net>; <hwg-languages(at)hwg.org>
Sent: Wednesday, December 27, 2000 2:04 PM
Subject: RE: passing variables from one form to another using Perl


Jan -

Would you send a snippet of page #2?  I believe I can help.

- Doug

-----Original Message-----
From: Jan Morell [mailto:jan_man(at)bellsouth.net]
Sent: Wednesday, December 27, 2000 11:59 AM
To: hwg-languages(at)hwg.org
Subject: passing variables from one form to another using Perl


I have seen something like this before, but the HWG search seems to be out
so I was not able to check the archives.

I have a two part form where the visitor fills in some information and then
that information should be passed to another form filling in the fields with
the information that the visitor has supplied using Perl

I have no trouble passing the contents of the form variables to the body of
the page, but when I try to put them into the 'value' of the form element,
it only shows the variable name and not the value.

I have tried to enclose the variable name in single, and double quotes, and
no quotes.  What is the format that a variable going into another form
element should follow?

Thanks in advance.  If you need any snippets, I would be happy to include
them.

Jan

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA