Forums

How can I preview the data in my form before submitting them

alexanderb 25 Sep, 2009
Hello,

I would like to give my clients the chance to check and change their data before they submit them to me.
For example:

form1-html
  <center>
<input type="text" size="17" name="text">
  <br><br>
  <center>
<input type="text" size="17" name="text1">
  <br><br>
 <center>
  <input type="submit" value="OK">
  </center>


form1-php
  <?php
  $zahl1 = $_POST["text"] ;
  $zahl2 = $_POST["text1"] ;
  ?>
  <br><br><br>
  <?php
  $addition = $zahl1 + $zahl2;
  $subtraktion = $zahl1 - $zahl2;
  $multiplikation = $zahl1 * $zahl2;
  $division = $zahl1 / $zahl2;
  ?>

*********************************************************
So now I get the result as an email, but I would like to be able to change the numbers,
before I send the email.

Thank you very much!
Alexander
GreyHead 25 Sep, 2009
Hi alexanderb,

The Confirmation Page plugin is designed to let users confirm their results just like this.

You can do your calculations in several ways (a) in JavaScript in the form, (b) in the OnSubmit Before Code Box (needs a little wrinkle to get the values into the email IIRC); (c) in the server-side validation box; (d) in the Email template (you need to turn off the rich editor in the Email Setup Properties); or (e) in the Confirmation page html if you choose to use that.

Which of these is best depends on your work-flow. The OnSubmit Before box (b) is the usual solution.

Bob
alexanderb 25 Sep, 2009
Dear GreyHead,

thank you very much!
I will go for "(b) in the OnSubmit Before Code Box".
Is there a good tutorial about the "OnSubmit Before Code Box"?
But thank you anyway.

Thank you!
Alexander
This topic is locked and no more replies can be posted.