Add additional text to multiple choice | XM Community
Skip to main content
Solved

Add additional text to multiple choice

  • April 13, 2022
  • 5 replies
  • 262 views

Forum|alt.badge.img

Right now I have multiple choice question with a text area below it
I would like to append the text inside
 


I would like to use jquery to append text between the

I have tried several options but can't seem to make it work.
example.png

Best answer by jrc3

Thanks to NTTdocomo post here Form text boxes elements — Qualtrics Community
I was able to achieve my goal with the following:
Qualtrics.SurveyEngine.addOnload(function()
{
/*Place your JavaScript here to run when the page loads*/
jQuery("#"+this.questionId+" input[type='radio']:first").after("some text here");
jQuery("#"+this.questionId+" input[type='radio']:eq(1)").after("some text here");
jQuery("#"+this.questionId+" input[type='radio']:eq(2)").after("some text here");
jQuery("#"+this.questionId+" input[type='radio']:eq(3)").after("some text here");
jQuery("#"+this.questionId+" input[type='radio']:last").after("some text here");
});

5 replies

ColbyA
Level 4 ●●●●
Forum|alt.badge.img+23
  • Level 4 ●●●●
  • 35 replies
  • April 13, 2022

Hey skyman ,
Not answering your specific question, but does adding the appended text into the choice and using rich text editor to format to your needs suffice? Unless you have prescribed design needs (I.e. the aesthetics of a single size button), that may also help directly tie your explicative to the choice.


Forum|alt.badge.img
  • Author
  • 7 replies
  • April 13, 2022

I did use use the rich text editor and it does look more acceptable but the rich text is then added to the report which is undesired.
example.pngI am interested in how to use jquery and append static text to the multiple types, because adding text below breaks the mobile view.
example2.png


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6084 replies
  • April 13, 2022

jrc3 - Add the text to the choices then under recode modify the choice labels to remove the extra text. I believe that will address your reporting issue.


Forum|alt.badge.img
  • Author
  • 7 replies
  • April 13, 2022

TomG while that does not address the question, I did try it and the results report did not change.
setting.png
report.png


Forum|alt.badge.img
  • Author
  • 7 replies
  • Answer
  • April 13, 2022

Thanks to NTTdocomo post here Form text boxes elements — Qualtrics Community
I was able to achieve my goal with the following:
Qualtrics.SurveyEngine.addOnload(function()
{
/*Place your JavaScript here to run when the page loads*/
jQuery("#"+this.questionId+" input[type='radio']:first").after("some text here");
jQuery("#"+this.questionId+" input[type='radio']:eq(1)").after("some text here");
jQuery("#"+this.questionId+" input[type='radio']:eq(2)").after("some text here");
jQuery("#"+this.questionId+" input[type='radio']:eq(3)").after("some text here");
jQuery("#"+this.questionId+" input[type='radio']:last").after("some text here");
});