Hi! I'd like advice on what is the javascript for forcing lowercase text entry in a specific column within a matrix table.
For example, in the screenshot attached, I need all the email addresses entered to be in lowercase (second column). The names (first column) have no case restriction.
The javascript I know for doing this on a text entry is this: "jQuery("#"+this.questionId+".InputText").on('input', function () {this.value = this.value.toLowerCase();});})", but I'm not sure how to adjust this code for a matrix table. So any help would be greatly appreciated! Thank you. (:
Checking back on my previous query. Anyone expert enough to venture an answer? Or is my question not clear enough?
Change ".InputText" to ".last .InputText"
https://www.qualtrics.com/community/discussion/comment/38335#Comment_38335Nope, this didn't work. Thanks anyway. (:
Okay. Matrices do not use the class InputText:
Try this: jQuery("#"+QID+" .last input")
make note of the spaces.
https://www.qualtrics.com/community/discussion/comment/38356#Comment_38356Oh great! This is working now! THANK YOU.
What happens though if the column is not the last column, but say the 3rd column in the centre? What code should I use?
Inspect the element. Find its class name (should be something like c4) and replace last with it.
Ok, I'll give that a try! Thank you so much, once again. (:
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.