How to retrieve element ID's inside a question | XM Community
Skip to main content
I would like to disable the Entry text field for five seconds, but I cannot find out the field IDs (not QID - I know how to get that).
hey @welork ,

Preview your survey and inspect the input field in page.

Below image will help you:



!
Hello @welork ,



The id of the entry text field is "QR~"+this.questionId.

For eg if question id is "QID4"(without quotes) then element id is "QR~QID4"(without quotes)



If we have more than one entry text fields then the id will be "QR~"+this.questionId+"2" , where 2 is the second text input field.!



In the above image field 2 (with line) has id circled in the image.
> @PradeepKotian said:

> hey @welork ,

> Preview your survey and inspect the input field in page.

> Below image will help you:

>

> !

>



hi again @welork ,

I like to add one more option to select id for text question by using javascript.

Below code will help you:

`var qid = jQuery("#"+this.questionId+" input[type=text]").prop('id');`

Thank you very much. It worked.


Leave a Reply