Home › Forums › Quform WordPress › Limit Digit Amount
- This topic has 4 replies, 2 voices, and was last updated 13 years ago by
brabox.
- AuthorPosts
- October 10, 2013 at 4:54 pm #6848
brabox
ParticipantHello,
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.
October 11, 2013 at 1:34 pm #6863Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
October 11, 2013 at 3:15 pm #6864brabox
ParticipantHello 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″ />
October 14, 2013 at 9:45 am #6896Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
October 14, 2013 at 2:40 pm #6913brabox
ParticipantThank 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
- AuthorPosts
- You must be logged in to reply to this topic.
