[Solved] Skip/autosubmit page if question is hidden


Hi there!

I am hiding a question with the following JavaScript-Code which is on the same page.


  var consum1 = ‘[question(“value”), id=”69″]’*1;
  var consum2 = ‘[question(“value”), id=”73″]’*1;
  var consum3 = ‘[question(“value”), id=”74″]’*1;
  var consum4 = ‘[question(“value”), id=”75″]’*1;
  if (consum2 > consum1 && consum2 > consum3 && consum2 > consum4){

How can I skip or autosubmit this page if the question is hidden?
Is there something like “if hidden than sgapiJumpToPage(%%next_page_id);”?

Best regards,

Christian selected answer

    Best answer




        %%consum1 = sgapiGetValue(69);
        %%consum2 = sgapiGetValue(73);
        %%consum3 = sgapiGetValue(74);
        %%consum4 = sgapiGetValue(75);

        if (%%consum2 > %%consum1 && %%consum2 > %%consum3 && %%consum2 > %%consum4)

    Christian selected as best answer

      Question – are there other questions on the page, or just the script and the question (q71)?

      If q71 is on its own page, my group would probably place the script on an admin page, and then use the sgapiHidePage function to hide or unhide the page with q71 on it as needed (a hidden page will be skipped and will never be seen by the respondent).  We would also use custom scripting for this rather than JavaScript.

      Christian commented


        Question stats

        • Active
        • Views149 times
        • Answers2 answers
        • Followers1 follower