Provide Bullets for Survey Participants When Typing Comments | XM Community
Skip to main content
Question

Provide Bullets for Survey Participants When Typing Comments

  • November 23, 2020
  • 1 reply
  • 17 views

Forum|alt.badge.img+3

Greetings!
I have a client that has a survey made up mainly of open comments. They would like to give participants the option to format their comments with bullets, like a rich text editor for the comments. Is that possible? If so, how is it set-up?
Thanks!!
Alicia

1 reply

Tom_1842
Level 8 ●●●●●●●●
Forum|alt.badge.img+28
  • Level 8 ●●●●●●●●
  • November 12, 2022

Hi there, if you still need, something like this can be put in place by adding the below to the OnReady section of a Text Entry question's JavaScript. It adds a line break, bullet, and a space each time the Enter key is pressed. I adapted it from here
jQuery("#"+this.questionId+" .InputText").val('• ');
jQuery("#"+this.questionId+" .InputText").on('keydown',function(e){
  var t = jQuery(this);
  switch(e.which){
  case 13:
    t.val(t.val()+'\\n• ');
    return false;
  } 
});
LinebreakBullets.png