Streaming live at 10am (PST)

Maxlength for input (forms)

Hey, trying to set a limit for max characters for my inputs in my form.

The left one to ‘3’, and the right one to ‘5’.

As for now, maxlength=“x” in attributes doesn’t work at all and you can write limitless numbers…

Also, bonus question: I also would like the placeholder text to disappear once you press the input, but now it stays until you type something.

Big thanks!

Here is my site Read-Only: LINK
(how to share your site Read-Only link)

Typo maybe? since maxlength is the attribute required.

The baked in browser behavior is just that. There is no attribute to deliver that behavior. It may be possible with custom code, but I would really ask why bother. Messing with form element behavior is always a serious usability concern/issue.

Thank you @webdev for your answer,

Typo maybe? since maxlength is the attribute required.

Unfortunately was just a typo in this topic, but not in my project…

Please share a published URI for testing.


Read-only link is found in topic description

maxlength is for type=text.