Community Groups are officially here!
We've released Groups, a new feature that enables us to connect community members of similar industries and interests in a shared, private space. You can check out all of the details here, including information about who can join, how to join, and what Groups are currently offered. Please leave your feedback through this Community Groups Feedback Survey.

Add label to the right of Star-Scale Question

joshua_s
joshua_s TacomaCommunity Member, Qualtrics Brand Admin Qubie ✭

Hi All,

I'm working with the scale question and want to get a second label added to the right of the scale. I wasn't able to find an option for this, is there a way to create a code for this?

Thanks in advance!

Best Answer

  • C_Bohn
    C_Bohn Salt Lake City, UTCommunity Member, XMPN Member, Qualtrics Brand Admin Guru ✭✭
    Accepted Answer

    You will want to insert some JS into the question.

    Click the gear icon (Advanced Question Options) to the left of the question. Select "Add JavaScript".

    Insert the following where appropriate under the "Qualtrics.SurveyEngine.addOnload..." section.

    Qualtrics.SurveyEngine.addOnload(function()
    {
    var questionId = this.questionId;
    var choiceInputs = $$('#'+this.questionId + ' .ChoiceStructure input');
    for (var i=0; i < choiceInputs.length; i++)
    {var choiceInput = choiceInputs[i]; try
    {if (choiceInput && choiceInput.parentNode)
    {choiceInput.parentNode.appendChild(QBuilder('span',{},'after star text here'));
    }
    }
    catch(e)
    {
    }
    }
    });

Answers

  • joshua_s
    joshua_s TacomaCommunity Member, Qualtrics Brand Admin Qubie ✭

    That worked flawlessly.

    Thanks so much!

  • sheid123
    sheid123 Community Member, Qualtrics Brand Admin Qubie ✭
    edited October 2020