anyone done this before ? When I have a lot of Products on the page, and I have a button for example “contact us for questions” and when you clic, then open a form, and inside that form there is automatically the product number the client want to ask somtehing about ?
So a lot of products, each product with a own site and only one contact form wich sync the product number ?
The way you can do this is using URL Parameters.
So the button would link to the contact page but the url would also contain some values that a small script will grab and place in the form field you want to populate.
Hä? Is there an example ?
I will PM you lol
Hi Pete, will you PM me also?
Here is a very basic example of how you can achieve this.
EDIT: Added a disabled attribute to the product field so it is read only.
Form_URL_Params.bloc (1.4 MB)
Specific solutions will be a freelance job
Thanks Pete I thought it was going to be more difficult, but it’s not that hard.
You should have been able to make it then @KBConcepts
There are actually more complicated ways to do it, especially if you want to support outdated browsers.
Also you could automate the URL Parma’s by grabbing text from the product page and forming the url with it when you click the contact button. But that sounds like freelance work
FYI I renamed the thread, so it’s more descriptive and easier to find later.
Yes, I wouldn’t have any problem using Blocs to accomplish this.
Smart move, Pete renaming the thread
I have tried to get this to work but can’t. I must be missing something.
I have copied over the “code widget content” to my form, copied the URL content for the button and renamed one of the form fields “product”. Pressing the button takes you to the page which contains the form, but nothing is populated.
@stephend, can you post your project file and I will have a look.
You may of solved this already.
Thank you Sir for the example file, very cool indeed.