Building the response in a particular structure. | XM Community
Skip to main content
Question

Building the response in a particular structure.

  • February 19, 2025
  • 4 replies
  • 43 views

Forum|alt.badge.img+2
  • Level 2 ●●

Hello All, 

Please let me know if the following can be done in Qualtrics. I have 20 questions. 12 of them are conjoint questions (Multiple choice). 

The Conjoint Question looks as follows: 
 


The first row is for SMS availability, second for color, third for display and last one is price. 

Suppose a respondent chooses the third choice. Usually the output in Qualtrics would come as :
 

Question#
Choice 3 

 

It is possible to get the output as following ? If a straight approach is not available may be JavaScript would be needed. 

 


Any help would be appreciated. 

Thanks

 

 

 

 

4 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • February 19, 2025

You’ll need JavaScript to save the attributes of the selected choice either to embedded data fields or another question(s) on the same page.


Forum|alt.badge.img+2
  • Author
  • Level 2 ●●
  • February 19, 2025

@TomG thanks for your response. 

I did not quite understand. If possible, could you give me an example or the code/flow to make it happen? I am unsure how to execute what you mentioned and would appreciate a detailed help. 


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • February 20, 2025

@OBh,

It won’t do it for you, but I’ll point you in the right direction. There are many ways it could be done, but let’s say you add a form field question with four rows (SMS, Color, Display, Price) after your multiple choice and hide it with JS. Also, embed a hidden delimited list of the attributes in your choice labels, like:

Purchase<span class="attrs" style="display:none;">Yes|Rose|10 inch|$189</span>

Then in the addOnPageSubmit() function find the label for the selected choice, parse the contents of the hidden span, and populate the form field.


Forum|alt.badge.img+2
  • Author
  • Level 2 ●●
  • February 20, 2025

@TomG Thanks for the direction. I will try this one.