Color question. | Experience Community
Skip to main content
Solved

Color question.

  • Oct 15, 2018 5:55 PM UTC
  • 7 replies
  • 68 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 !
View original

7 replies

MaryC
Level 2 ●●
Forum|alt.badge.img+2
  • Level 2 ●●
  • Oct 15, 2018 6:50 PM UTC
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
  • Oct 15, 2018 9:04 PM UTC
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 ●●
  • Oct 15, 2018 9:52 PM UTC
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

  • Answer
  • Oct 16, 2018 4:55 AM UTC
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
  • Oct 16, 2018 5:16 PM UTC
Thank you @MaryC . @Shashi where should I exactly paste the code in :text entry" question?

  • Oct 16, 2018 5:22 PM UTC
> @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

  • Feb 28, 2019 11:27 PM UTC
@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 :) ! !