Hi,
I've created a form field question with five rows. If I want the second row to have a character limit of 8, what would the JS be? Currently the below is not working...
Thanks
Mark
Best answer by cbhavsar
View originalHi,
I've created a form field question with five rows. If I want the second row to have a character limit of 8, what would the JS be? Currently the below is not working...
Thanks
Mark
Best answer by cbhavsar
View originalHi Mark,
Here is the jquery syntax that you can use...
$("input[name='QR~QID2#2~TEXT']").attr('maxlength',8);
Let me know if it doesn't work. Share direct link of question to better understand and I can help.
All the best with your project!
Sorry cbhavsar I'm not sure where to add that syntax. Are you able to write it out in full for me?
Qualtrics.SurveyEngine.addOnReady(function()
{
jQuery("input[name='QR~QID2#2~TEXT']").each(function () {
jQuery(this).on("input[name='QR~QID2#2~TEXT']").attr('maxlength',8);
});
});
Here you go...
Qualtrics.SurveyEngine.addOnReady(function()
{
jQuery("input[name='QR~QID2#2~TEXT']").attr('maxlength',8);
});
Thank you!
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.