How to set character length (maxlength) for input box/text box

You may try out method attribute() in order to add maxlength:

input = createInput().attribute('maxlength', maxChars);

1 Like