close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Auto-Fill Form Fields w/ Product Data

Thread began 10/11/2012 3:28 pm by dc50093 | Last modified 11/08/2012 9:52 am by Jason Byrnes | 1376 views | 7 replies |

dc50093

Auto-Fill Form Fields w/ Product Data

I need to build a quote request form for a client which will be linked to from several thousand product pages. The customer will click on a link from a static html product page to open the quote request form. Is there a way to carryover data from the product page to pre-populate some of the fields in the quote request form, product name, product number for example.

Sign in to reply to this post

Jason ByrnesWebAssist

pass the product ID as a url variable to the quote page, use a recordset to lookup the product in the database based on the passed URL variable and use the recordset for the form elements initial values.

Sign in to reply to this post

gavind

As an intermediate user for this, is there a quick guide online for me to see the step by step guide in doing this?

Sign in to reply to this post

Jason ByrnesWebAssist

what this boils down to is a Master Detail page set.

see this Dreamweaver tutorial for details:
WScbb6b82af5544594822510a94ae8d65-78b8a.html

Sign in to reply to this post

dc50093

The site is a static site so there is no database.



Originally Said By: Jason Byrnes
  pass the product ID as a url variable to the quote page, use a recordset to lookup the product in the database based on the passed URL variable and use the recordset for the form elements initial values.  
Sign in to reply to this post

Jason ByrnesWebAssist

then the links would need to pass the product info as query string variables

<a href="quote.php?prodName=Widget A&prodDescription=A Really helpful widget">quote</a>



the use the URL variables as the initial value for the forms:

<input type="text" name="prodName" id="prodName" value="<?php echo(isset($_GET['prodName'])?$_GET['prodName']:""): ?>

Sign in to reply to this post

dc50093

Not Working

Jason, this code is not working for me- it returns a syntax error and the page will not load. Can you be a bit more specific?

Originally Said By: Jason Byrnes
  then the links would need to pass the product info as query string variables

<a href="quote.php?prodName=Widget A&prodDescription=A Really helpful widget">quote</a>



the use the URL variables as the initial value for the forms:

<input type="text" name="prodName" id="prodName" value="<?php echo(isset($_GET['prodName'])?$_GET['prodName']:""): ?>  
Sign in to reply to this post

Jason ByrnesWebAssist

Sorry, the code for the form element should be:

php:
<input type="text" name="prodName" id="prodName" value="<?php echo(isset($_GET['prodName'])?$_GET['prodName']:""); ?>" />
Sign in to reply to this post

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...