The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group
Is it possible to change default select option based on referring link?
Hello,
I have a contact form which includes a simple select drop-down.
Is it possible to change the default value of the select field based on the referring link?
For example,
If two 'calls to action' link to the same Contact form page e.g. Arrange Visit and Request Brochure, depending on which CTA is clicked the select drop-down then auto-populates with either Arrange Visit or Request Brochure?
Thank in advance for any advice.
September 21, 2018 at 7:20 pm
Hi Victoria,
Yes, it is easy to do.
1. Add a URL parameter to your referral links
e.g. http://www.example.com/link-to-your-form-page/?referral=av and http://www.example.com/link-to-your-form-page/?referral=rb
Here "referral" is the URL parameter with values "av" and "rb".
2. In your dropdown field settings, set "Dynamic default value" to [get param=referral]. This will use the URL parameter to get its default value.
3. Since I used the short form "av" and "rb" respectively for "Arrange Visit" and "Request Brochure", enable "separate values" in your dropdown fields and set separate values accordingly. Using short form is not necessary but it is recommended because any changes in drop-down labels will not affect the default value.
You can learn more about default values and separate values here
https://formidableforms.com/knowledgebase/using-dynamic-default-values-in-fields/#kb-get-a-parameter-from-the-url
https://formidableforms.com/knowledgebase/separate-values/
September 21, 2018 at 9:25 pm
Probably several ways to do it. One way is to use the [ get param=whatever ] in the dynamic default value, and then send that value in the link to the contact page
For example, the "Purpose" dropdown field on this form:
https://oneofmydomains.com/victoria/
will be pre-selected differently depending on which page/cta you click on from these pages:
https://oneofmydomains.com/request-brochure/
(cta link: https://oneofmydomains.com/victoria/?purpose=Brochure)
https://oneofmydomains.com/arrange-visit/
(cta link: https://oneofmydomains.com/victoria/?purpose=Visit)
More info on using get param here:
https://formidableforms.com/knowledgebase/using-dynamic-default-values-in-fields/#kb-get-a-parameter-from-the-url
September 24, 2018 at 3:45 am
Great help everyone, thank you so much!
October 15, 2018 at 7:56 am
Hello,
I have got the URL parameter to work on the referral link and display the correct info in the drop-down field.
However I now need to auto -populate two drop-down fields based on the referring url, is this possible?
Thanks for any help!
Discussion closed.