Web form to include Previoously visited page -possible?

He has: 1 posts

Joined: Aug 2007

Currently I have about about 5 different "centralized" forms on our website from which about 50 or so product pages link to for people to request more information. The problem I have is that people view a product page, then click the "Contact Us" button to get to the form. They then leave a message that's very specific to that product WITHOUT mentioning or identifying the product they were talking about. I would like to have the form include the previously viewed page prior to filling out the form. Is that possible? If so, how can I implement something like that? Or is there a better solution I haven't thought of? I know I could create 50 individual forms but that's too much hassle to setup and maintain. Any suggestions would be greatly appreciated. Thanks

They have: 8 posts

Joined: Aug 2004

Have u tried using "document.referrer". document.referrer carries the address of the last page visited by the browser.

Assign it's value to a variable in your form. might work...

cheers
namita

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

Assuming you have product IDs for each product, just pass the contact page the productID in the URL:

[="Courier New"]http://www.whatever.site/contactus.php?product=productID[/]

Then on the contact us page, place it as a hidden input on the form:

[="Courier New"]">[/]

-Greg

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.