Link to home
Start Free TrialLog in
Avatar of consulatlanta
consulatlantaFlag for Andorra

asked on

Javascript cascading selection with hidden options

Hello everyone,

I would like to create a page with a questionnaire where people progressively select options based on answers they provided.  I would like to keep the page clean and thus only offer options that make sense for someone to select.

This could be something like someone choosing a country, then a region within the country selected, then a city within the region that was selected.

Could also be a bit more complicated such as a questionnaire with groups of questions to topics such as:

A Do you want to provide your address? Yes  -> show various fields  then show question B  No -> go to question B but don’t show question C yet, allow to choose yes at a point afterwards
B Do you now want to talk about your education?  Yes then show options,  no --> skip to C  same as above
C Do you want to enter some personal words?
… etc


I hope I didn’t make this too complicated. Does anyone have a template or suggestion how this can be achieved?

Many thanks!
Richard
Avatar of Tom Beck
Tom Beck
Flag of United States of America image

With javascript only, no server side coding? How are you recording the answers?
Avatar of consulatlanta

ASKER

Hello Tommyboy,

sorry, will be embedded into a php page and the answers will be recorded in a database.

Richard
ASKER CERTIFIED SOLUTION
Avatar of Tom Beck
Tom Beck
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you! I probably prematurely asked the question without giving much thought into the possibilities that you mentioned. I will close the question for now and re-ask when I can get some more info.
Thank you so far!
Good luck with the project. Thanks for the points.