Registration/Profile Fields maxlength

Is it possible to limit Single line text to 3 any combination of characters? I tried maxlength in the other attributes field but it didn’t change anything.
There is not an option for maximum in the dropdown for Expected Format.
Any advice appreciated.

Hi Sherry,

True, there isn’t a max length in that setting.

I guess you could limit it with some javascript in the field…

In the custom profile field editor, under “Other Attributes”, add:

oninput="this.value = this.value.slice(0, 3);"

Screenshot%202023-05-26%20at%2000-27-43%20s2Member%20General%20Options%20%E2%80%B9%20AMEHAC%20%E2%80%94%20WordPress

:slight_smile:

That worked perfectly!
Thanks so much. Was thinking I was going to get all kinds of odd entries if I couldn’t limit that. Whew!

1 Like

Great! :grinning: