Max length on text field

Hi guys,

Because max length on a text field isn’t supported yet, we’re wondering if you guys have some tips or tricks. We’re now thinking of using just regular javascript to cover the issue, but it feels like overkill.

Also we’re wondering when this attribute will be supported?

Any suggestions?

Hi there!

Depending on how you want to handle the maximum length, you should be able to use the input event to handle your logic.

Support for maxlength is on our backlog, and should be coming in a few releases.

Hi there,

We have resolved this issue by adding the following to our input listener.
if (input.value > 99) {
input.value = 99;
}

It isn’t the prettiest and the user doesn’t get direct feedback, but it at least helps preventing “crashing” the plugin if you go too nuts.