cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jjb8297
Level 6

Licence Key Format

Greetings,

I am trying to set up a licence key so that the user has to enter it in the following format:

xxxx-xxx-xxxx

I am using the customerinformation dialog to do this on, and right now I have a single text box on the screen and the user enters it as xxxxxxxxxxx. I am open to suggestions from

1. Using regular expressions to make sure that it follows the above format specified above.

2. To having three separate text boxes and forcing the user to enter it into each box, and when the first box is filled it flows into the second and so on.

Any sample code would be appreciated. Thanks.:)
Labels (1)
0 Kudos
(2) Replies
jjb8297
Level 6

jjb8297 wrote:
Greetings,

I am trying to set up a licence key so that the user has to enter it in the following format:

xxxx-xxx-xxxx

I am using the customerinformation dialog to do this on, and right now I have a single text box on the screen and the user enters it as xxxxxxxxxxx. I am open to suggestions from

1. Using regular expressions to make sure that it follows the above format specified above.

2. To having three separate text boxes and forcing the user to enter it into each box, and when the first box is filled it flows into the second and so on.

Any sample code would be appreciated. Thanks.:)



I believe I have figured out number 2 and have decided to go with that option, what I am going to go with the mask edit control, and set up the mask on the control to be aaan-nnn-naaa where a = alpha character and n = numeric value.

Does anyone have any idea on how to set this up? I thought this would work, but I am getting some kind of a undefined string error.

&&&#-###-#&&&

If anyone has any ideas on this please let me know. Thanks.:)
0 Kudos
jjb8297
Level 6

jjb8297 wrote:
I believe I have figured out number 2 and have decided to go with that option, what I am going to go with the mask edit control, and set up the mask on the control to be aaan-nnn-naaa where a = alpha character and n = numeric value.

Does anyone have any idea on how to set this up? I thought this would work, but I am getting some kind of a undefined string error.

&&&#-###-#&&&

If anyone has any ideas on this please let me know. Thanks.:)


Okay, the above mask gives me some extra input fields that I don't really want to have. I want to have just three input fields and some way to identify that the fourth character is numeric, that the middle three is numeric and that the first character of the last four is numeric. Shouldn't be too hard to do, 😉
0 Kudos