Community Groups are officially here!
We've released Groups, a new feature that enables us to connect community members of similar industries and interests in a shared, private space. You can check out all of the details here, including information about who can join, how to join, and what Groups are currently offered. Please leave your feedback through this Community Groups Feedback Survey.

Constant sum without prefilled 0

cloof
cloof BerlinCommunity Member Qubie ✭
edited August 4 in Custom Code

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?

Best Answer

  • PraDeepKotian_Ugam
    PraDeepKotian_Ugam Mumbai, IndiaCommunity Member, Qualtrics Brand Admin Superuser ✭✭✭✭
    Accepted Answer

    hi @cloof,

    Add below code in Onload function of javascript:

    jQuery("#"+this.questionId+" li input[type=text]").val("");

Answers

  • cloof
    cloof BerlinCommunity Member Qubie ✭

    Awesome!
    Thank you very much :)

  • DW2020
    DW2020 Community Member Qubie ✭

    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?