Setting a text question response using js | XM Community
Solved

Setting a text question response using js

  • 6 November 2018
  • 2 replies
  • 18 views

Userlevel 1
Badge +4
How can we set a response to a text question using JS?
icon

Best answer by Anonymous 6 November 2018, 16:19

View original

2 replies

Userlevel 1
Badge +4
I have tried using below code but it's not working.

var questionId = this.questionId;
questionID.setChoiceValue(1,z.toString());
Hello @salimlko ,

Paste the below code in the js(onReady) of the text question

`jQuery("#"+this.questionId+" .InputText").val("Response to text question");`

Leave a Reply