close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Two page form

Thread began 9/27/2014 5:00 pm by saf01 | Last modified 10/02/2014 4:07 pm by Jason Byrnes | 808 views | 9 replies |

saf01

Two page form

Hi Im using DW CS5.5 plus latest versions of all extensions.

What would be the best way to do this: I have two forms. The first form has 4 fields, name, tel, postcode, email.

Filling in this form (form1.php) successfully I would like to have this form emailed and the data saved into database. After that the second form page appears (form2.php) which is a larger form asking for more details. After filling in form2.php, an email is sent and the data saved into database again which actually joins all the data saved from form1.php.

if user enters form2.php in the url, it would jump to index.php page where form1.php is. Both forms have been made and validated already.

I know I have add hidden fields on second form, Im just confused as to saving data and emailing redirect on the forms.

Please advise, appreciated.

Sign in to reply to this post

Jason ByrnesWebAssist

on the first page have the form set to post to itself. use the Data Assist insert record behavior to insert the form data, In the insert behavior, you can set a session name to save the ID of the inserted record, make note of this session name. then the Universal Email behavior to send the email, in Universal Email behavior, set it to redirect to the second form.

on the second form, again, post to itself, and use the insert behavior to save the form data. Int he relationship column, bind to the session set by the first insert. again use Universal Email to send the form data.

if you need help in setting this up, we can help through a premiere support appointment:
http://www.webassist.com/premier_request.php

Sign in to reply to this post

saf01

Thanks for the reply, Im using MySQLi extension and have recordsets on the form pages. Would using data assist record behaviour have problems with mysqli? Can I use mysqli > data management > insert behaviour instead of using data assist?

Sign in to reply to this post

Jason ByrnesWebAssist

Yes, you can use the MySQLi insert behaviors, they will also be able to save the inserted ID to a session.

Sign in to reply to this post

saf01

Great. Please tell me where the relationship column is?

Sign in to reply to this post

Jason ByrnesWebAssist

I can't tell you that, you would need to tell me that. I don't know the structure of your tables.

but where you inserting to 2 tables, the second table would need a column to create the relationship. an example would be a products table and a categories table:

categories:
categoryID - primary key
categoryName

Products:
productID - primary key
productCategoryID - relates to categories.categoryID
productName
etc

in this example, the productCategoryID column is the relationship column that creates the relation of the product to the category.

Sign in to reply to this post

saf01

I see. I would need to create the relationship id in the second form. thanks

Sign in to reply to this post

Jason ByrnesWebAssist

Yes, that is correct.

Sign in to reply to this post

saf01

Ive submitted a premier support ticket, please advise.

Sign in to reply to this post

Jason ByrnesWebAssist

I Have passed this on to Ray, he should be in touch to schedule the session.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

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.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...