text box+symbol+don't know in single answer question | XM Community
Skip to main content
Solved

text box+symbol+don't know in single answer question

  • May 23, 2019
  • 2 replies
  • 59 views

Forum|alt.badge.img+3
! How to display Text box with a unit symbol +don't know in single answer question Thanks

Best answer by Anonymous

Hello @Cathaya , Agreed with @jpardicusick, but for look and feel you can do the following: You can use custom JS to hide the first option label and add '%' after the text box. Try adding below code in the js(OnReady) of the single answer question: var that = this.questionId; jQuery("#"+that+" .SingleAnswer:eq(0)").hide(); jQuery("<span>%</span>").insertAfter(jQuery("#"+this.questionId+" .InputText")); jQuery("#"+that+" input[type='radio']:eq(1)").on('click',function(){ jQuery("#"+that+" .InputText").val(''); });

2 replies

JenCX
Level 5 ●●●●●
Forum|alt.badge.img+11
  • Level 5 ●●●●●
  • 683 replies
  • May 23, 2019
Personally, I'd just use a multiple choice with text entry that reads 'Percent of time spent on digital dragons discussions' and then the other choice 'Don't know'.

  • 0 replies
  • Answer
  • May 23, 2019
Hello @Cathaya , Agreed with @jpardicusick, but for look and feel you can do the following: You can use custom JS to hide the first option label and add '%' after the text box. Try adding below code in the js(OnReady) of the single answer question: var that = this.questionId; jQuery("#"+that+" .SingleAnswer:eq(0)").hide(); jQuery("<span>%</span>").insertAfter(jQuery("#"+this.questionId+" .InputText")); jQuery("#"+that+" input[type='radio']:eq(1)").on('click',function(){ jQuery("#"+that+" .InputText").val(''); });