Auto advance on pick code selection does not work

Qualtrics provides some JavaScript that it claims to automatically advance participants to the next survey question when they select an answer choice. They have options for single answer and multiple answer questions, but I only need the first one for my survey. I put their code in the right place, but I can't seem to get it to work. NOTE. I am trying to do a mobile compatible survey (not only compatible but very well done for mobile use). Qualtrics code doesn't work on mobile devices or on my laptop. I'm not sure if their code is wrong or if I need to do something else to implement it correctly.

Here's the code for Qualtrics Auto-Advance SINGLE-Answer Multiple Choice Questions provides:

    var that = this;
    this.questionclick = function(event,element){
        if (element.type == 'radio')  {
           that.clickNextButton();
        }
    }

      

Here's the code for auto-negotiation MULTIPLE-Answer Multiple Choice Questions Qualtrics provides:

    var that = this;
    this.questionclick = function(event,element){
        if (element.type == 'checkbox')  {
            that.clickNextButton();
        }
    }

      

Again, I'm only using the first one for my survey, but I thought I'd include both anyway. I know Java and C quite well, but I have never studied JavaScript so I am not sure how they work with Qualtrics and if this code is correct or something I am not doing.

Also, if anyone has a solution that is not in JavaScript (for example, if it is in CSS or HTML or something weird), I would appreciate other options.

Thanks in advance!

+3


source to share


3 answers


I'm really not sure why the code didn't work before, because now it works great:

Qualtrics.SurveyEngine.addOnload(function()
{
    var that = this;
    this.questionclick = function(event,element){
        if (element.type == 'radio')  {
            that.clickNextButton();
        }
    }


});

      



I guess it was some kind of bug in the Qualtrics part because it is the same exact code now working.

+2


source


you are correct, it is only set up to work for both single answer multiple choice and multiple answer multiple choice, so it is not intended for additional coding beyond that. Here is a site you can use to test it: https://new.qualtrics.com/SE/?SID=SV_1S8i98l8YClkZ5H&Preview=Survey&BrandID=qcorp



Additionally, Qualtrics can help you troubleshoot your code if you give the support team a call.

0


source


Auto go to next question + No Next button (fastest way to navigate through the survey)

  • Enter Javascript submission for any question
  • Copy and delete all code
  • Insert the following
Qualtrics.SurveyEngine.addOnload(function()
{
    var that = this;
    this.questionclick = function(event,element){
        if (element.type == 'radio')  {
            that.clickNextButton();
        }
    }


});

      

  1. Enter HTML view for the same question

  2. Add cursor to end / end of text

  3. Add the following

<style>
     #NextButton {display:none;}
</style>

      

  1. All is yours. Preview for testing
0


source







All Articles