Constant sum without prefilled 0 | XM Community
Solved

Constant sum without prefilled 0

  • 30 October 2018
  • 3 replies
  • 221 views

Userlevel 1
Dear Community,
I am looking for a way to ask which percentage of purchases was made online with an open box to enter values from 0-100. The box should be followed by the text "% online". With constant sum this text can be added, however there is always a 0 prefilled already so that respondents could just click next. If 0 is a valid value respondents can enter, is there any way to remove the prefilled 0 just showing an empty box?
Or if using a text entry question, is there any way to add the "% online" on the right hand of the entry box?
icon

Best answer by PraDeepKotian_Ugam 30 October 2018, 10:52

View original

3 replies

Userlevel 6
Badge +21
hi @cloof,

Add below code in Onload function of javascript:

jQuery("#"+this.questionId+" li input[type=text]").val("");
Userlevel 1
Awesome!
Thank you very much 🙂

I want to achieve exactly this, but the code does not seem to work for a constant-sum question type which uses bars instead of text fields only. How can I set up a constant sum question with bars and eliminate the pre-filled zero?

Leave a Reply