Home › Forums › Quform WordPress › Limit Digit Amount
Hello,
I have tried searching the form but did not find anything.
How do i limit the amount of digits or characters that can be typed in the field?
I am using the Length validator but i could not find how to prevent client from typing X amount.
You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
Hello Ally,
the length validator is working fine. i set it to minimum 5 and max 5. The error messages are working fine.
But what i wanted is the limit the # of characters the client can type in the field, i do not want him to go over X amount.
This is a simple HTML example for max 10 characters:
<input type=”text” id=”Textbox” name=”Textbox” maxlength=”10″ />
Thank you Ally,
i had to add ” instaed of ‘ to make it work.
this is how it looks with more than one element.
<script> jQuery(document).ready(function ($) { $(".iphorm_22_31, .iphorm_22_54").attr('maxlength', '5'); }); </script>
Thanks!
Marco