Multi-part / multi-page form
I used to know how to do this but it's been a while
how do I set up a multipart/multi-page from universal email
happy new decade to all
R
I used to know how to do this but it's been a while
how do I set up a multipart/multi-page from universal email
happy new decade to all
R
on page 1, set the forms method to post, and the action to go to page 2:
<form name="form1" method="post" action="page2.php">
<label for="fName">First Name</label>
<input type="text" name="fName" id="fName">
<br>
<label for="lName">Last Name</label>
<input type="text" name="lName" id="lName">
<br>
<label for="submit"></label>
<input type="submit" name="submit" id="submit" value="Submit">
</form>
on page 2, in addition to the new form fields, you need to create hidden form fields to capture the data that was posted from page 1, if it is the last page, the action can be left blank:
<form name="form1" method="post" action="">
<label for="city">City:</label>
<input type="text" name="city" id="city">
<br>
<label for="state">State:</label>
<input type="text" name="state" id="state">
<br />
<input name="fName" type="hidden" id="fName" value="<?php echo((isset($_POST["fName"]))?$_POST["fName"]:"") ?>">
<input name="lName" type="hidden" id="lName" value="<?php echo((isset($_POST["lName"]))?$_POST["lName"]:"") ?>">
<input type="submit" name="submit" id="submit" value="Submit">
</form>
happy new decade... wow... now i remember - it works like a top
much thanks again R -
Hey Ray
Am looking to set up a form that spans 8 pages (its a bigun!) - would I follow the above like this?
Page 1 .submit
Page 2 hidden fields of input from page 1
page 3 hidden fields of input from page 2 AND page 1
page 4 hidden fields of input from page 3 AND page 2 AND page 1
etc?
Thanks
That would work, but these days you can use the webassist persist form server behavior on each page and it might be easier.
ok cool. never used it before. do i split my form up into the 8 pages required ? am assuming they all need <form></form> on them,?
Yes. The persistence server behavior will save the entire form in the session and allow you to refer to it on later pages.
Hi Ray
Am not sure if am doing this correctly but have split my long form into 9 pages and added the persist to each page (see attached) but have a couple of questions:
a) not sure if I have done them right
b) how to use the persist data on the final page to submit it?
c) do I need universal email on each and every one of the pages?
Cheers
Jamie
It looks like you did it right.
Once you add the persistent form it should be available from any page in the bindings panel to use wherever you want.
You only need the Universal Email on the page you want to send the emails from.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.