In Q2 must appear just the options that are related to the answer in Q1, if Bolivia was choosen, in Q2 must appear just Beni, Chuquisaca and Cochabamba, and if Beni was choosen in Q2 must appear Loreto and Magdalena in the options of Q3.

I've tried to do work with this workaround but not succesful. My knowledge of javascript is minimum, and don't know why the workaround is not working.
My survey is configurated as "question by question".

Thanks in advance,
sorry for my bad english

The administrator has disabled public write access.

JavaScript is currently disabled.Please enable it for a better experience of Jumi.

Marcel, your solution looks ok but it could make the survey a little bit complex, too many questions, and don't know how this solution could affect the statistical analisys. I want to try the solution with javascript and if it doesn't work I'll use your solution.

Tony, I've tested javascript with an alert and it works, but the {INSERTANS} don't know how to test it. I've attached a sample survey with the javascript codes in the questions.

Another more portable way of handling this may be to use text inputs with the jQuery autocomplete workaround. The data source for autocomplete (list of states or cities) could be defined depending on the previous answers.

Having said that, here is my suggestion for your particular case. I wouldn't use the workaround you are trying - I think it's overkill for what you need.

<script type="text/javascript" charset="utf-8">
$(document).ready(function(){// Get the countryCode (first character of the country)var countryCode ='{INSERTANS:47126X993X12555}'.substr(0,1).toUpperCase();// Loop through all dropdown options and remove those with codes not starting with the countryCode
$('select[id^="answer"] option').each(function(i){if($(this).attr('value')&& $(this).attr('value').substr(0,1).toUpperCase()!= countryCode){
$(this).remove();}});});</script>

<script type="text/javascript" charset="utf-8">
$(document).ready(function(){// Get the countryCode (first character of the country)var countryCode ='{INSERTANS:47126X993X12555}'.substr(0,1).toUpperCase();// Get the stateCode (first 2 characters of the state)var stateCode ='{INSERTANS:47126X993X12556}'.substr(0,2).toUpperCase();// Concatenate the two codesvar fullCode = countryCode + stateCode;// Loop through all dropdown options and remove those with codes not starting with the fullCode
$('select[id^="answer"] option').each(function(i){if($(this).attr('value')&& $(this).attr('value').substr(0,3).toUpperCase()!= fullCode){
$(this).remove();}});});</script>

Here is a working sample survey:

Attachment not found

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

I had a question related to this one but not exactly the same. I understand the logic of making questions appear depending on the answers of the previously asked questions. What if I wanted the options of a question to appear only if they were checked in the previous question.