Max length on text field

dialog
#1

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?

0 Likes

#2

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.

0 Likes

#3

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.

0 Likes