pass through parameters ?
Thomas Phillips created the topic: pass through parameters ?
Is there any way of passing through parameters through the URL and capture it in the form?
eg
www.summit-fs.co.uk/income-protection?so...ok&campaign=adstype1
where sources and campaign would be hidden fields
Please Log in or Create an account to join the conversation.
- Topic Author
- Thomas Phillips
- Offline
- Fresh Boarder
- Posts: 2
- Thank you received: 0
7 years 5 months ago
Agapi G. replied the topic: pass through parameters ?
Hello Thomas! Thanks for posting your question!
This is surely possible to achieve, you will just need to write a few lines of Javascript code in Form Options > Javascript.
Here's a Stackoverflow link, the solution includes an example of the code you will need to use:
goo.gl/EKqLmW
Please try this out and let me know in case you will need help with the script.
Thanks! Have a great day!
Kind regards,
Agapi G.
Web-Dorado team
Please Log in or Create an account to join the conversation.
7 years 5 months ago
Thomas Phillips replied the topic: pass through parameters ?
Hi
Thats a great help - but I'm still not sure exactly how to adapt the code
the URL will be like this
www.summit-fs.co.uk/income-protection?ut...g&utm_content=image1
so hidden fields would be
utm_source
utm_campaign
utm_medium
utm_term
utm_content
although in form make the fields seem to have a set ID that can't be edited
what woudl teh script look like for this ?
Please Log in or Create an account to join the conversation.
- Topic Author
- Thomas Phillips
- Offline
- Fresh Boarder
- Posts: 2
- Thank you received: 0
7 years 5 months ago
Agapi G. replied the topic: pass through parameters ?
Hello Thomas!
Please note, that you don't need to edit the field IDs. Instead, you can get them from the front page where your form is published. I have attached a screenshot of the ID you need to use.
Then you will need to assign the value of your parameter to this field the following way:
jQuery('#wdform_6_element13').val(theParameterValue);
Thank you! Have a wonderful day!
Kind regards,
Agapi G.
Web-Dorado team
Please Log in or Create an account to join the conversation.
7 years 5 months ago