Access the Question Name From JavaScript | XM Community
Skip to main content

Hi- How do you access a question's name from JS? (eg the text that defaults to 'Q1' in the Survey admin UI, but that you can change to whatever you want). I tried getQuestionInfo() but it's not there.

Thanks

Use the below code: (make sure you have checked 'Show Question Numbers' option under survey option)
var s = jQuery("#"+this.questionId+" .ExportTag").text();


Perfect. Thank you.


Leave a Reply