Welcome to the nuBuilder Forums!

Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.

Limit the number of characters allowed in the input field

Questions related to using nuBuilder Forte.
Post Reply
sadibou
Posts: 5
Joined: Sat Nov 24, 2018 11:54 am

Limit the number of characters allowed in the input field

Unread post by sadibou »

hi,
how can I limit the number of characters allowed in the form input field ?
exemple :
<input type="text" name="code" maxlength="10" />
alf1976
Posts: 75
Joined: Tue Dec 26, 2017 8:58 pm

Re: Limit the number of characters allowed in the input fiel

Unread post by alf1976 »

Yes via Jquery

In the 'custom code' tab of your form, enter the JavaScript section and add, for example if the fieldname/object is JobTitle

$('#JobTitle').prop('maxLength', 10);
sadibou
Posts: 5
Joined: Sat Nov 24, 2018 11:54 am

Re: Limit the number of characters allowed in the input fiel

Unread post by sadibou »

:D thanks a lot alf1976
it works ;)
admin
Site Admin
Posts: 2829
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 30 times

Re: Limit the number of characters allowed in the input fiel

Unread post by admin »

.
Post Reply