Solved
Disabling period entry in text box
I'm trying to disable periods in the name field of a form. I've been googling for some code to update and I'm not having luck with it working. I don't want people to enter periods because it is causing problems later on in my processes.
I am trying to reference the text box in QID1, which happens to be the first form field.
Here's the code I'm trying to reuse from other sources:
Qualtrics.SurveyEngine.addOnload(function()
{
/*Place your JavaScript here to run when the page loads*/
$('QR~QID1~1~TEXT').keypress(function(key) {
if(key.charCode == 190 || key.charCode == 110) return false;
})
});
Any advice on what I can do so that the period and number pad decimal keys are disabled for this form field?
Thank you in advance!
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.