Multiple choice after custome code for text entry | XM Community
Skip to main content
Question

Multiple choice after custome code for text entry

  • October 28, 2024
  • 0 replies
  • 18 views

Forum|alt.badge.img+1

Hello, 

I would like a question with 3 MC options:

  1. Standard MC option 1
  2. Standard MC option 2
  3. $ xx per sale

Where xx is a text entry box with text either side (‘$’ to the left of the box, ‘per sale’ on the right of the box). I’ve used the JS code below to get a text entry box with text either, however I can’t seem to find a way to combine this with the 2 standard MC options - would be greatful for any ideas or workarounds. 

Thanks, 
Paul 

 

Qualtrics.SurveyEngine.addOnload(function()

{ /*Place your JavaScript here to run when the page loads*/ });

Qualtrics.SurveyEngine.addOnload(function()

{ /*Place Your Javascript Below This Line*

/ var inputs = $(this.getQuestionContainer()).select('input[type="text"]'); for (var i = 0; i < inputs.length; i++) { var input = inputs[i]; $(input).insert({before: '$ '}); $(input).insert({after: ' per sale'}); } });

Qualtrics.SurveyEngine.addOnUnload(function()

{ /*Place your JavaScript here to run when the page is unloaded*/ });

0 replies

Be the first to reply!

Leave a Reply