How to get multiple text entry with colour picker | XM Community
Skip to main content

Hi,
I am trying to create a question where people can choose their 10 favourite colours using a colour picker. For that I think I need to use the form setting for text entry, but the colour picker code below only seems to work with single line entry.
Qualtrics.SurveyEngine.addOnReady(function()
{
jQuery("[id='QR~"+this.questionId+"']").attr({"type":"color","value":"#ff0000"}).css({"width":"15%","outline":"none"});
});

Edit for anyone else who has this question, I found the answer. It is adding the entry box number to the this.questionId+
Qualtrics.SurveyEngine.addOnReady(function()
{
jQuery("[id='QR~"+this.questionId+"~1']").attr({"type":"color","value":"#ff0000"}).css({"width":"6em","height":"6em","outline":"none"});

});

Be the first to reply!

Leave a Reply