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

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


Userlevel 2
Badge +3
!

How to display Text box with a unit symbol +don't know in single answer question
Thanks
icon

Best answer by Anonymous 23 May 2019, 17:15

View original

2 replies

Userlevel 7
Badge +11
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'.
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('');
});

Leave a Reply