From June 7 through June 18, we will be performing minor community maintenance. As a result, email notifications may not send during this time. We apologize for any inconveniences!
You may have noticed the url for our site changed, as we are preparing to launch our community redesign. Stay on the lookout for details coming soon, and be sure to update your bookmarks!

How to give the 'Choice Text' a different 'Piped Text'

emmahouwaardemmahouwaard AmsterdamCommunity Member Qubie ✭

How to give the 'Choice Text' a different 'Piped Text'

In my survey, Q1 asks about the origin of my participants. One answer option is "Afghanistan". When someone answers "Afghanistan", one answer option in Q2 has to be: "Afghan men/women". So in Q2 I don't need the country name, but the derivatives of the answer they selected in Q1.

I used several formulas (like: <span class="choiceText">Afghanistan</span><span class="pipedText;">Afghaanse</span>) --> and then put:

jQuery(".pipedText").hide();

in the JS, but this doesn't work..

Can anyone help me out?

Answers

  • ahmedAahmedA IndiaCommunity Member Wizard ✭✭✭✭✭

    Your question is not entirely clear, but it appears that a drill down question would suit this requirement.

  • emmahouwaardemmahouwaard AmsterdamCommunity Member Qubie ✭

    @ahmedA thank you for your response! Let me be more clear:

    I just want to use the answer a respondent fills in at Q1 in one of my answer options of Q2. But instead of the answer "Afghanistan" I want to use the derivative word "Afghan".

    I tried several formulas for this, but I can't figure it out..

  • TomGTomG Raleigh, NCCommunity Member, Qualtrics Brand Admin Wizard ✭✭✭✭✭

    @emmahouwaard ,

    You could format your answer choice like this:

    Afghan<span class="noPipe" style="display:none;">istan</span>
    

    Then add this JS to your Q1 question:

    jQuery("#"+this.questionId+" .noPipe").show();
    
  • emmahouwaardemmahouwaard AmsterdamCommunity Member Qubie ✭

    @TomG thank you! It works!

    Last question: why doesn't it work in a dropdown list? Then it still shows all the words..

  • TomGTomG Raleigh, NCCommunity Member, Qualtrics Brand Admin Wizard ✭✭✭✭✭

    Because html rules say that option tags can't have child elements. So, tags inside options get stripped by the browser.

Sign In to Comment