Hello! I am hoping for some help in extracting the value of a form field using Javascript. I need to know the actual values entered into the fields of a form question, so that I can do some math using them. I’ve tried the following for the first field in the form:
var apples = jQuery("#"+this.questionId+'.InputText').eq(0).val();
or jQuery("#"+this.questionId+" inputttype=text]").eq(0).val();
or jQuery("#"+this.questionId+".InputText:first").val();
or $("QR~"+this.questionId+"~1");
And then to see what I got I use this:
alert(apples);
The alert box always shows null with all the variations above. What am I doing wrong?