I have a text box that a user enters a 25 character key into.
<br><input type="text" name="Key" pattern=".{29}" style="text-transform:uppercase">
thats my current code. Now the thing I am trying to achieve is when the user types the first 5 characters it should add the - for them and then again after the next 5.
In the end it will look like this 11111-11111-11111-11111-11111
I did some research but cannot find anything. I have made the pattern the length that I want and made the text auto uppercase but I cannot find out how to add the hyphen automatically.