I tried looking in the forum for a solution, but was struggling figuring out how to search for this.
I have an one application form that can be gotten to via three options buttons on a comparison page before you get to the form. The only difference in these options are price. Before you get to the form, you can can select one of three buttons that link to the form based on your option choice. The application form is the same for all three options, just the option itself is the only different.
Basically, you land on a plan comparison page, with three plan options. In each comparison, there is a sign up now button: Option 1, Option 2, Option 3. Once you click the sign up button for that option, you go to the application form, which is exactly the same for each option.
Is it possible, that when you click the "Option 1" button that takes you to the form, that somewhere in the URL some information saying you clicked the "Option 1" button would be populated into the form? Or the button would have some sort of information that gets passed along to the form?
Right now, I have three separate identical forms, except for a hidden field that determines which option the form is for. I would like to simplify the site to have only one form for all three options, determined by the originating "a href" link or something similar, if other options are available.
Thanks,
Melvins138
I have an one application form that can be gotten to via three options buttons on a comparison page before you get to the form. The only difference in these options are price. Before you get to the form, you can can select one of three buttons that link to the form based on your option choice. The application form is the same for all three options, just the option itself is the only different.
Basically, you land on a plan comparison page, with three plan options. In each comparison, there is a sign up now button: Option 1, Option 2, Option 3. Once you click the sign up button for that option, you go to the application form, which is exactly the same for each option.
Is it possible, that when you click the "Option 1" button that takes you to the form, that somewhere in the URL some information saying you clicked the "Option 1" button would be populated into the form? Or the button would have some sort of information that gets passed along to the form?
Right now, I have three separate identical forms, except for a hidden field that determines which option the form is for. I would like to simplify the site to have only one form for all three options, determined by the originating "a href" link or something similar, if other options are available.
Thanks,
Melvins138
Hi Melvins138,
I would do this with three links in the first form - Bootstrap has some CSS that turns a link into a good looking button - class='btn'
Any variables in the link URL will be added to the $form->data[''] array by ChronoForms and can be used in your form On Load event, or passed to the On Submit event either through a hidden input or by using the data to session & session to data actions (or possibly the multi-page action).
Bob
I would do this with three links in the first form - Bootstrap has some CSS that turns a link into a good looking button - class='btn'
Any variables in the link URL will be added to the $form->data[''] array by ChronoForms and can be used in your form On Load event, or passed to the On Submit event either through a hidden input or by using the data to session & session to data actions (or possibly the multi-page action).
Bob
Hi Bob,
These are links from outside the form, to get to the form.
So you click the link outside the form, you click option one link... then go to the form and populate it with information that says that you clicked option 1 to get to the form. Same with option 2 and option 3.
Thanks,
Melvins138
These are links from outside the form, to get to the form.
So you click the link outside the form, you click option one link... then go to the form and populate it with information that says that you clicked option 1 to get to the form. Same with option 2 and option 3.
Thanks,
Melvins138
I guess, what I mean is, I don't understand how to get "variables in the link URL will be added to the $form->data[''] array by ChronoForms and can be used in your form On Load event, or passed to the On Submit event either through a hidden input or by using the data to session & session to data actions (or possibly the multi-page action)."
I write the link like <a href="pagename.html$form->data['option1']"> and that data['option1'] would be put into the form using some OnLoad event to populate into a hidden input?
I'm not sure how to do this.
I write the link like <a href="pagename.html$form->data['option1']"> and that data['option1'] would be put into the form using some OnLoad event to populate into a hidden input?
I'm not sure how to do this.
Hi Melvis138,
Any variables in the link URL will be added to the $form->data[''] array by ChronoForms . . . Please try it and see,
Bob
Any variables in the link URL will be added to the $form->data[''] array by ChronoForms . . . Please try it and see,
Bob
I guess that I don't understand how to do what you are suggesting. I am reading this FAQ and this FAQ, but I'm not sure how to create the URL with &item_id=option1 without breaking the link (because I am using Joomla SEF), then I am not sure where I am supposed to put the $form->data['input_name']? In a custom PHP within the form? On an OnLoad event? Which OnLoad event? 'DB Record Loader' or 'Session to Data'? Then what am I supposed to put what, where?
Basically, all of this is over my head. I am wonderfully appreciative of the amount of help you provide. It blows my mind, how helpful you are. My problem is you are speaking calculus, and I only speak single digit addition. 😀 😶 🤣
I think my best solution for me is to create three articles and duplicate the form three times so that each article can house a different form, then in each individual form, I will put a hidden text input with a value="option1" and one more each for 2 and 3.
Thank you again for taking time to answer this post.
Basically, all of this is over my head. I am wonderfully appreciative of the amount of help you provide. It blows my mind, how helpful you are. My problem is you are speaking calculus, and I only speak single digit addition. 😀 😶 🤣
I think my best solution for me is to create three articles and duplicate the form three times so that each article can house a different form, then in each individual form, I will put a hidden text input with a value="option1" and one more each for 2 and 3.
Thank you again for taking time to answer this post.
Hi Melvins138,
You add links to your article like this:
Then in the form On Load event you will find that $form->data['option_picked'] has the value 1, 2, or 3
Bob
You add links to your article like this:
<a href='index.php?option=com_chronoforms&chronoform=my_form_name&option_picked=1'>Option1</a>
<a href='index.php?option=com_chronoforms&chronoform=my_form_name&option_picked=2'>Option2</a>
<a href='index.php?option=com_chronoforms&chronoform=my_form_name&option_picked=3'>Option3</a>
Then in the form On Load event you will find that $form->data['option_picked'] has the value 1, 2, or 3
Bob
This topic is locked and no more replies can be posted.
