Thank you in advance for your time reading this post. If you have a solution or advice that you don't mind sharing, it is greatly appreciated.
I am currently using FormIt to attempt to accomplish my goals. I don't mind using a different option.
I am building a multi-page form/survey to collect data from health specialists.
On page 1, the user is asked a question. The user is given four radio inputs (e.g. we can call them 1, 2, 3, 4) with answers, and the user can only select one of them.
The user now clicks 'next'.
After clicking next, the user is directed to a page based on their selection.
For example, if the user selects either of the first two radio inputs, they are directed to a specific page to answer another question specific to the first two radios.
If the user selects the third radio input, the user is directed to a different page that is specific to the radio to answer another question.
And if the user selects the fourth radio, they are sent a different page that is specific to the radio to answer another question.
And when the user clicks 'next,' that data will be transferred to the next page. And this cycle will continue until the end, where the user clicks 'send.' At this time, all of the data from the users answers will need to be stored in a database or emailed to me.
I'm a ui designer and front-end developer with a little php and ruby knowledge -- so I can follow suggestions. I have researched a solution for quite a few hours over the last two-weeks while ramping up my goals, and I've tried a variety of tricks, but I haven't been able to accomplish very much.
Again, thank you for your time. Any help is greatly welcomed and appreciated!
-
☆ A M B ☆
- 24,524 Posts
I think the simplest way is to use the $_SESSION array. Save the user's selections in the SESSION, then as he goes from page to page get the values he's submitted from the SESSION.
You could also use a cookie, or even the new HTML5 local storage feature, but that's getting into areas where your user may not have that available in his browser version.
You could also use a custom database table, if you want a permanent record. In that case, the user would need to be logged in to keep a permanent relationship to that user.
@sottwell
Thank you for your advice.
I am going to do some research on using the $_SESSION array and I'll post results. I sure there was a way to use a placeholder on "redirectTo" and have the radio selection fill the placeholder on 'go'. That would be so very handy...
-
☆ A M B ☆
- 24,524 Posts