Buy Now
Sign in

Use button/link to populate information on form

Stush , June 14 at 03:27
S
Stush
Good afternoon, I was wondering if it's possible to make it so that a field is populated based on what link you used to navigate to a page?​
​​
​The basic idea is that I want a single contact page with a form on it, and if you get there by clicking on a button on another article (Which has the title or something in it), it knows to put that into the form. I've made forms that can tell which page they're on before, but i've never done it this way, do you have any resources that might help me with this? Thankyou.
GreyHead
Hi Stush,
Parameters from the query string of the calling URL are automatically added to the form data so you can then display or use them. For example, if you have a query parameter &title=xxx and you have a form input named title then that will display xxx
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
S
Stush
Will this work if I have multiple buttons/articles on the same URL?
H
healyhatman
Yes.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
S
Stush
Sorry, i might be missing something, I don't understand how it'll know to give me a different outcome based on the URL if the URL you navigate from is the same for each of the buttons.​
​​
​Like say i have a page, and it's a blog layout with like 5 different buttons, and I want each of the buttons to populate the field differently, if it's based on the URL, won't each of those buttons give me the same result?​
​​
​Sorry if i'm missing something obvious.
H
healyhatman
Give all the buttons the same NAME and a different VALUE then use an event switcher
If you're using links from outside the form, pass the data value as a url parameter
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman