Solved
Pull a set of characters from a text entry response in a form question
I have a form question set up with 5 text extry boxes. In the third box, respondents will enter a code in the format 0000-00000-0000... I would like to pull the middle five digits and create an embedded data field.
I thought I could use something like this, but I haven't been able to figure out how to apply it to a form question.
var str = "${e://Field/ResponseID}";
var res = str.substr(13,18);
Qualtrics.SurveyEngine.setEmbeddedData("PatientID", res);
How would I use javascript to target the third text entry box and pull the data?
Best answer by TomG
```
var res = jQuery("#"+this.questionId+" input[type=text]").eq(2).val().substring(5,10);
```
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
