ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

Use button/link to populate information on form

Stush 14 Jun, 2018
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 14 Jun, 2018
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
Stush 14 Jun, 2018
Will this work if I have multiple buttons/articles on the same URL?
Stush 21 Jun, 2018
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.
healyhatman 21 Jun, 2018
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
cappleby 10 Jul, 2018
Is there any way this can be achieved when the form is embedded in an article?
This topic is locked and no more replies can be posted.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com