Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Possible to change an earlier answer during survey without altering already gathered data?


I have a survey with a long form and a short form, encoded in the variable 'short' short = 1 is the short form, and short = 0 is the long form.

In the survey there are skips set to skip over long form questions when short = 1, and also jquery and css code to hide or display questions depending on short form status.
setInterval(function () {
    if(  [% short %] == 0 ) {
        $("#[% QuestionName() %]_div").css('display', 'block');
    else {
        $("#[% QuestionName() %]_div").css('display', 'none')
    }}, 100);

Occasionally during the middle of a survey, a respondent is not able to finish the entire long form survey, and they need to switch to a short form ideally. I'm wondering if there is a way to change the value of the 'short' variable from 0 to 1 during the survey, in a relatively user-friendly way, without compromising any of the previous long form data that has already been gathered?

One idea that I had was trying to use jquery to link up a global variable change to a key press for a specific key, although I'm not completely sure how to go about this, and am not sure how it would affect the data integrity. If anybody could let me know if what I want to do is even possible, and if it is give me a bit of advice, that would be great.

asked Aug 3, 2017 by Jake Hammond (285 points)
retagged Aug 3, 2017 by Walter Williams

1 Answer

0 votes
I'm not sure about how the script logic will affect but maybe on the forms you can add an update to variable and on every form load you can check it and based on that you can skip to another part of the survey...
Just thinking out loud...
answered Aug 16, 2017 by Mithat Bronze (4,410 points)
Hi Mithat, thanks very much for that, I'm not quite sure I follow though, would you mind elaborating a bit more?