Jump to content

Different results page based on form choices


alexm
 Share

Recommended Posts

I'm looking to set up a Form (using FormBuilder) with questions that are simple yes or no choices using radio select.

Based on the combination of answers given, different results pages would need to be shown.

I'm wondering what the best way to go about this might be. I was thinking perhaps on each results page you could have checkboxes of the questions that need to match yes or no, then use a selector to match the page(s) with the most matches.

Any other ideas are welcomed and most appreciated ?

Link to comment
Share on other sites

Hi,

honestly, as long as you already have set the yes/no questions in the forms, i think it would be simpler (and a bit less confusing for the user) to calculate that match thing when dealing with the form post vars before displaying the result page, it would avoid you having to do twice the job ?

have a nice day

Link to comment
Share on other sites

@virtualgadjo Thanks for replying! ? Sorry, I might not have been very clear. This is exactly how I mean. So the user selects yes or no to each question, hits submit, then show the most relevant result/success page based on their selection. I'm wondering what is the best way people think is to go about this?

Link to comment
Share on other sites

hi again ?

ok, now, i understand a little more the problem which is to have a single page displaying different contents depending on the form submission and, i can see two or three different easy ways to deal with this
1 - if the content if complex, not a simple content of a few fileds, you may have a cached page the chidren of which are the different contents you will display on the result page and, of course
the way you choose what page content to display depends on what you prefer, it could be having an array/object storing something like result/page id or a field in each of those pages to store what result it matches
2 - if the content is not that big or complex, you could also have a repeater in the result page and code which one is to display depending on the form result

the third one is one of my bad habits ? storing the results in a personal db table with a custom admin module/page to edit them and retrieving the result, once again, depending on the form result but, honestly, the more i work with pw, the more i tend to use its abilities to deal with different contents and data structure, i am in a slow personal table rehab process ?

Have a nice day

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...