Color question. | XM Community
Skip to main content
Solved

Color question.

  • October 15, 2018
  • 7 replies
  • 32 views

MoFar
Forum|alt.badge.img+1
I want participants to choose their preferred color of the product. Is there a way to show them a color spectrum where they can choose their color instead of writing down its name?

Best answer by Anonymous

Hello @MoFar , The following solution will capture hex code of color in data and analysis. Create a "Text Entry" question type and paste the following code in the js(onReady) of the created question: ` jQuery("[id='QR~"+this.questionId+"']").attr({"type":"color","value":"#ff0000"}).css({"width":"15%","outline":"none"});` Output !

7 replies

MaryC
Level 2 ●●
Forum|alt.badge.img+2
  • Level 2 ●●
  • 41 replies
  • October 15, 2018
You can do this with a heat map or hot spot question type. You can create an image that has the colors displayed that you want them to chose from. With a hot spot, you have to define regions and it is reported with the region name you create. With a heat map you do not have to define regions, but you can.

MoFar
Forum|alt.badge.img+1
  • Author
  • 6 replies
  • October 15, 2018
Thank you. But they still can't choose a specific point in the hot spot, which is what I'm looking for.

MaryC
Level 2 ●●
Forum|alt.badge.img+2
  • Level 2 ●●
  • 41 replies
  • October 15, 2018
I added regions to the first 4 boxes to this survey to give you an idea. I used the hot spot question type: https://concordiaplanservice.az1.qualtrics.com/jfe/preview/SV_00o4u3gwZMP3IzP?Q_SurveyVersionID=current&Q_CHL=preview

  • 0 replies
  • Answer
  • October 16, 2018
Hello @MoFar , The following solution will capture hex code of color in data and analysis. Create a "Text Entry" question type and paste the following code in the js(onReady) of the created question: ` jQuery("[id='QR~"+this.questionId+"']").attr({"type":"color","value":"#ff0000"}).css({"width":"15%","outline":"none"});` Output !

MoFar
Forum|alt.badge.img+1
  • Author
  • 6 replies
  • October 16, 2018
Thank you @MaryC . @Shashi where should I exactly paste the code in :text entry" question?

  • 0 replies
  • October 16, 2018
> @MoFar said: > Thank you @MaryC . > @Shashi where should I exactly paste the code in :text entry" question? > Follow this page and paste code in the OnReady function

  • 1 reply
  • February 28, 2019
@Shashi this looks awesome but for some reason this does not work for me. I added the line of code but can only see the normal textbox when previewing the survey. I attached two screenshots - would very much appreciate if someone could tell me what I'm doing wrong. Thanks a lot in advance :) ! !