SlyOne Posted February 17, 2009 Share Posted February 17, 2009 Hi, I'm wanting to create a small and simple questionnaire form on my site that will have roughly 10 or so questions on with checkboxes for the user to answer by. There will be two options of each question to be answered, a yes and a no checkbox. However, if the user answers a question as a yes, I would like to have another question appear automatically underneath it. Was wondering how i would go about this? Can this be done via dreamweavers dynamic behaviours/bindings or do i need to do it via handcoding php or ajax or something? Any guidance on this would be greatly appreciated. thanks Quote Link to comment https://forums.phpfreaks.com/topic/145582-creating-a-questionnaire-form/ Share on other sites More sharing options...
SlyOne Posted February 17, 2009 Author Share Posted February 17, 2009 Here is how it looks at the moment... just a simple form with questions and a yes and a no checkbox underneath each question. Just needing to know how i can create a behaviour that would spawn a new question directly underneath the users previously POSITIVELY answered question. Quote Link to comment https://forums.phpfreaks.com/topic/145582-creating-a-questionnaire-form/#findComment-764334 Share on other sites More sharing options...
Philip Posted February 17, 2009 Share Posted February 17, 2009 edit, you got the image working. Anyways, the questions appearing after one is answered can be done with plain old javascript, unless you want them saved after the answer the question (then that would become ajax.) I'd recommend using radio buttons instead of checkboxes for yes/no questions, so they can only select one option. Quote Link to comment https://forums.phpfreaks.com/topic/145582-creating-a-questionnaire-form/#findComment-764337 Share on other sites More sharing options...
SlyOne Posted February 17, 2009 Author Share Posted February 17, 2009 Well, if the user answers the second or "spawned" question positive aswell, then I will have some subjects appear underneath that. So for the first question lets say was answered as a yes and its spawned question as a yes, I would have subjects in relation to industrial university subjects appear (about 10 or so). If not, the user moves on. Anyway, I'm not exactly hot on either javascript or ajax, are there any tutorials around that i could adapt to this kind of thing? oh and good idea about the the radio buttons, will sort that now. cheers Quote Link to comment https://forums.phpfreaks.com/topic/145582-creating-a-questionnaire-form/#findComment-764343 Share on other sites More sharing options...
SlyOne Posted February 17, 2009 Author Share Posted February 17, 2009 anyone able to point me towards a tutorial that could help me on this please? Quote Link to comment https://forums.phpfreaks.com/topic/145582-creating-a-questionnaire-form/#findComment-764513 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.