I want to create a landingpage with an introductory question for a funnel (which is on another page). The response to said question will be in form of 3 buttons (e.g. Option a, Option b, Option c). All buttons link the user to the same page containing the form. I would like the form to be prefilled with the selected Option that was used to get to the form.
I am pretty new to bricks and would appreciate your help with achieving this. As a side note I am familiar with html and css but don’t have a lot of knowledge when it comes to js and php. If the later are needed to achieve this I’d appreciate a bit of explanation alongside.
I am also using the bricksforge plugin if using that would make things easier.
Thank you all in advance for your help
Cheers Patrick
If the selected choice is in the url-param you can use {url_parameter:your_key} in the value field of the form-field, were your_key is the name of the param. It will then insert the value in the field.
Hi Tobsen, thank you for the quick reply. I got it to work.
I used the “external URL” option and added the key there. Would it also be possible to achieve the same result using an interal post/page link? It doesn’t seem like it’s possible to add any additional text to the selected target.
You mean for your buttons you used the external url to add the params? Thats a good idea. I don’t think its possible to use the internal (post / page) setting and add params to it (you could request that feature). But you could use {site_url}/your-page-slug?your_param=your_value . So at least the siteurl would be dynamic but if the slug of the page changes it breaks. But I guess it’s not such a common thing to change the slug, so it should be fine.
Exactly I used the external url for the param. I guess using internal linking with params is not a thing as of now then. I will make sure to use your workaround so the urls are sort of dynamic.
Last question I promise : Would there be a way to transfer the information from the button to the form if instead of a new page it’s implemented as a popup? In that case I wouldn’t be able to link to the form as it is still on the same page technically speaking, right?
This is not working for me. I tried:
{site_url}/contact?topic=renting and it set the URL but no data was prefilled. I tried standard text fields as well, assuming it may have been something tricky with pulldowns, but name=value didn’t work for the name field, nor did email=me@address.com.
I’m guessing I’m going about this all wrong. Does this only work with Bricks forms? If I’m using Fluent Forms, how might I set a button to pre-select an option in a pull down?