Hello @saralanda
Thank you very much for using our plugin.
I’ll try to describe the process with a hypothetical example.
Assuming the URL parameter is v=1, or v=5, etc. and the dropdown field is the fieldname1. You can insert an “HTML Content” field in the form and enter the following piece of code as its content:
<script>fbuilderjQuery(document).one('showHodeDepEvent', function(){
getField('fieldname1').setVal(getURLParameter('v', ''));
});</script>
Best regards.
Thanks for your quick response.
I copied the script and pasted it in an “HTML Content” field below the dropdown field.
The dropdown is named fieldname1.
This is the url https://tulumcharters.com/test/
You can see a short video of what the form settings look like: https://www.loom.com/share/f92762861de448eab42b478752459ec2
It is still not working. Not sure what i’m doing wrong.
Thanks for your help
-
This reply was modified 3 years, 11 months ago by
saralanda.
-
This reply was modified 3 years, 11 months ago by
saralanda.
-
This reply was modified 3 years, 11 months ago by
saralanda.
Hello @saralanda
My apologies, there is a typo in my code, the correct is:
<script>fbuilderjQuery(document).one('showHideDepEvent', function(){
getField('fieldname1').setVal(getURLParameter('v', ''));
});</script>
Please, after replacing the code in the “HTML Content” field, please, visit your URL with the v parameter:
https://tulumcharters.com/test/?v=3
Best regards.
Hi again,
The js script above works well when there is only 1 cff on the page. However, when there is more than 1 cff, it only works for the first one, even though I pasted the script in all forms.
https://tulumcharters.com/test/?v=3
How can I make it work for multiple forms on the same page?
Thank you
Nevermind, I fixed it by writing getURLParameter(‘v’, ”) in a calculated field in each form.
Hello @saralanda
Thank you very much for sharing your solution.
Best regards.