[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 277
  • Last Modified:

Sending Multiple forms with PERL

I have two forms.  Form 2 is a continuation of Form 1.  How to I use PERL to create code that will take data from BOTH forms and email it to me as ONE email.  This may take up to three forms to collect data to send via e-mail
0
MevaCat
Asked:
MevaCat
  • 3
  • 2
  • 2
1 Solution
 
amandeepCommented:
MevaCat,

I think u are not putting ur question clearly.
Here is my understanding :
- U have got 3 forms.
- First form is submitted then second form is displayed.
- Second form is submitted then the 3rd form is displayed.
- 3rd form is submitted then the entire information collected using the 3 forms are emailed to you.

Is the above correct?
Is there any url where I can see the forms?

Please provide as much details u can.
0
 
MevaCatAuthor Commented:
amandeep,

  You are correct.  Unfortunately I do not ahve the forms online yet.  It could be ANY three forms.  Form one is submitted and form 2 shows.  Form 2 is submitted and form 3 shows.  Form 3 is submitted and the data from all three forms is sent vial email to the customer.  I have tried to use Matt's FormMail but that only sends each form as it is submitted - NOT as one email but 3 separate emails

URL:home.hiwaay.net/~juricta/Lisa/mainpage.html
   Then choose Home Insurance.  There needs to be two more pages (not available yet)

The three forms are "fill in the blanks".  The info will be used to give the user a price quote on insurance options.  

Let me know if this is not enough info.
0
 
amandeepCommented:
MevaCat,

I would suggest u to post the 3 forms required here.
Please specify what all contents of the forms are to be e-mailed and to whom.

Please provide as much details u can.

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
MevaCatAuthor Commented:
The two forms are located at the URL shown below.  Click the Home button.  The next form originall had a "Submit" button to send the data via email.  I want to have a button that will open a second form (see "continue" link on 1st form).  This "continue" will send data from one to 2 (or place data in hold).  The submit button on form 2 will send data from BOTH forms via email

Each piece of data is sent via email to the recipient (currently me) and the recipient will "act" on thte data for a price quote.  The CGI script is Matt's FormMail script but it can only send ONE form at a time

http://home.hiwaay.net/~juricta/Lisa/buttons1.html
0
 
andreifCommented:
Just use hidden field inside form nr. 2 to pass data from form nr.1,

so the result from form nr.1 submission is form 2 with some hidden data and the result of form 2 is a email with all data...

This process can be continued without any limits of forms quantity
0
 
MevaCatAuthor Commented:
andreif,
  Not sure what /how to do what you state.  Could you be a more specific?  An example of code?  Anything?
0
 
andreifCommented:
Something like this:

--------------------
Form1.html

<form action="mailer.cgi" method=post>

Field 1 <input type="text" name="field1">

<p><input type=submit>
<input type="hidden" name="step" value="1">
</form>

--------------------
Form2.html - this form should be generated by mailer.cgi when it get the first form results. You can identify first form by the hidden input "step" which value is 1

<form action="mailer.cgi" method=post>

Field 2 <input type="text" name="field2">

<p><input type=submit>

<!-- old data -->
<input type="hidden" name="field1" value="value of the field 1 placed here by the script">

<input type="hidden" name="step" value="2">
</form>

--------------------
mailer.cgi

# Parse form data into hash $in

if ($in{step} eq "1") {
  # print out form 2
} elsif ($in{step} eq "2") {
  # send form data to email
}

--------------------

As you can see, the field1 value filled in the Form 1 is inserted into Form 2 as a hidden field. After submitting Form 2 script get field1 as well as field2 and send it to email
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now