Solved

Sending Multiple forms with PERL

Posted on 2001-07-02
7
263 Views
Last Modified: 2012-08-14
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
Comment
Question by:MevaCat
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 5

Expert Comment

by:amandeep
ID: 6246082
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
 

Author Comment

by:MevaCat
ID: 6248149
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
 
LVL 5

Expert Comment

by:amandeep
ID: 6253621
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
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!

 

Author Comment

by:MevaCat
ID: 6259167
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
 
LVL 6

Expert Comment

by:andreif
ID: 6259516
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
 

Author Comment

by:MevaCat
ID: 6259541
andreif,
  Not sure what /how to do what you state.  Could you be a more specific?  An example of code?  Anything?
0
 
LVL 6

Accepted Solution

by:
andreif earned 100 total points
ID: 6259664
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
cpan issue 1 66
Filtering a file to table 9 102
Perl script to find new files and compress those new files 5 123
Perl Snippet to Parse String 1 39
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question