Max length on Unbound text control (1 Viewer)

Geirr

Registered User.
Local time
Today, 08:15
Joined
Apr 13, 2012
Messages
29
Hi all.

I've tried to get my head around uisng mask on a text control on a from, but I believe I'm asking for too much...

The problem is that I need to solve is.
- Any length but max 10 char/digit/special char.
- Any combination of char/digit/special char must be allowed.
- When 10 pcs are entered, any more input are blocked.
- Avoid the placeholder and the 'cursor' change to 'replace/edit' - style.

In short term - same behavior if I bound the controll to a table filed, and just add max length to 10, with no other mask or input control...
I've been thinking on some kind of OnKey in combination on Len, but haven't found a good solution. I hope someone else have tried this
and may have a good solution on this issue.

I can make a soultion with a local table and use this as bound control. Any new/edit are to sql backend anyway, but I was hoping for a
more easy solution instead...

Brg.
Geirr
 

conception_native_0123

Well-known member
Local time
Today, 01:15
Joined
Mar 13, 2021
Messages
1,212
I've been thinking on some kind of OnKey in combination on Len, but haven't found a good solution. I hope someone else have tried this
and may have a good solution on this issue
you may be right here, and that is a good start. i believe the purpose of "keydown" is to detect a press of a key, and that the event fires before any data is thrown out from the key press. so kind of like HTML's onBlur event. you could check for "len()", yes, and issue a "cancel" if len > 10. based on what you said, that seems to make perfect sense.

not sure about the other specifications you listed. I personally can't really follow those. can you clarify for everybody on that?
 

Users who are viewing this thread

Top Bottom