Click here to Skip to main content
15,885,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi i want to create a form so my users can enter codes in them but i don't know what this kind of form is called
So basically if the user enters more then 5 characters then you add a - this keeps happening until the max characters (20) has been reached
It should look something like this

12345-67891-12345-67891
That - has to auto fil itself

How do i do that or what is this called so i can find it?

What I have tried:

Tried searching giftcodes but that dosn't look the way i want it to same with verification codes
Posted
Updated 6-Jan-23 1:10am
Comments
Richard MacCutchan 5-Jan-23 6:03am    
You probably need to do it with some Javascript in the actual form.

The search term you're looking for is "Javascript masked input".

For example: Javascript Input Mask | imaskjs[^]
 
Share this answer
 
While we are more than willing to help those that are stuck, that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for us to do it all for you.

So we need you to do the work, and we will help you when you get stuck. That doesn't mean we will give you a step by step solution you can hand in!
Start by explaining where you are at the moment, and what the next step in the process is. Then tell us what you have tried to get that next step working, and what happened when you did.

If you are having problems getting started at all, then this may help: How to Write Code to Solve a Problem, A Beginner's Guide[^]
 
Share this answer
 
Comments
minoesje minoes 6-Jan-23 3:31am    
I understand that I just wanted to know what its called because everytime i try searching it up i get a gift code system with words like (Christmasparty2023) i want one written like i did before but I don't know what a system like that is called so I can't find it on Google so my question was "what is that called so I van look it up?" Not i want this make it for me

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900