Forums

Is it possible to do a multilevel questionnaire?

Noterious 10 May, 2008
Is it possible to create a form with questionnaire like the following link? http://questexasia.ilinksys.com/subscribe_page.php

If you click on option#2 in the first question, a drop down menu shows up.

How do you create it using Chronoform? Just put all the javascript in 'Form Javascript' window?

Thanks

Edit: Is it possible to use a separate database to collect the form data, not Joomla database?
GreyHead 10 May, 2008
Ho Noterious,

Yes, and Yes.

And just to double check - by drop down menu you mean the tool-tip that displays on the mouse-over? Or did I look at the wrong thing?

Bob
Noterious 10 May, 2008
Thanks for the reply.
But,I meant the questionnaire in the purple table in the form.
If you click on option 2 of the question '1. *What is the primary business activity of your company?', there will be another drop down menu shows up.

Thanks
GreyHead 10 May, 2008
Hi Noterious,

Ah - missed that completely. It looks as though most of the code for that is in the form so you'd need to replicate it there in ChronoForms and put the appropriate parts of script.js into the JavaScript box.

Here's the form code for Q10.
<tr>
<td width="5%" valign="top" align="right">
  <input type="hidden" value="question1" name="question1_active_field"/>
  <input id="question1" type="radio" value="10" name="question1"
    onclick="javascript: show_select("select_question1_10","question1",1); 
    if (document.Sub_Form.select_question1_10 != null) {  
      show_select("select_question1_10_"+document.Sub_Form.select_question1_10.value, "question1",2);}"/>
</td>
<td width="3%" valign="top" align="left"> 10</td>
<td width="92%" valign="top">Health & Education</td>
</tr>
<tr id="select_question1_10" style="display: block;">
<td width="5%" valign="top" align="right"/>
<td width="3%" valign="top" align="left"/>
<td width="92%" valign="top">
<img src="img/L.gif"/>
  <select class="form" 
    onchange="javascript: 
    show_select("select_question1_10_"+this.value,"question1",2); "
    name="select_question1_10">
  </select>
</td>
</tr>
Bob
Noterious 11 May, 2008
Thank you, Greyhead. I managed to make the hidden drop down menu work. :cheer:
Noterious 11 May, 2008
Now I have another problem.😟
I want to use Mootools validation with the form, but my template has it loaded already. What should I do? I can't turn off Mootools in my template.
Any help is appreciated.
Max_admin 11 May, 2008
Just choose mootools as the validation in Chronoforms, if it didnt work because of a conflict then go hack chronocontact.html.php so it doesn't load the files or just rename the folder "js" in the chronocontact folder so the files don't get loaded!

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Noterious 11 May, 2008
Thanks to kwelker from this post, Now I have a working div based multipage form with validation.
Noterious 11 May, 2008
Another problem comes up.
By following the code here for the multipage div validation

<input type=button onclick=" if(!valid.validate()) Event.stop(ev) ; collapseElem('mainForm_1') ; expandElem('mainForm_2') ;"   
class="mainForm" value="Next Page" /> 


I got an error 'ev is not defined' which I have no idea what to do.

Any idea would be appreciated

edit: I found a solution. Instead of using the code above for a form validation on 'Next Page' button, I use the following code instead. It works for me.

<input type=button onclick=" if(!valid.validate()) return false ; collapseElem('mainForm_1') ; expandElem('mainForm_2') ;return true;"    
class="mainForm" value="Next Page" />
This topic is locked and no more replies can be posted.