This may be a poorly worded question because I'm not sure of the lingo but allow me to explain.
I have a form field on my website where the user inputs a date (DOB.) I need the date in a specific format (MM-DD-YYYY.)
As of right now, the PHP is able to reject dates not in this specific format. (E. g. M-D-YY or MM/DD/YYYY) It will only accept and store MM-DD-YYYY which is exactly what I want. No problem here.
However, for the sake of making it easier for the user to understand, I would like to add a sort of placeholder inside the field. (E. g. _ - - _ _ _ ) So, as the user is typing those underscores turn into numbers and it skips the hyphens and the user can easily see the date is accurately entered.
March 4, 1982 for example must be 03-04-1982. If the user tries to enter 3-4-1982 what they will actually get with the pre-inserted underscores and hyphens is 34-19-82_ _. The user can easily see this is incorrect.
So, with all that said, the caveat is it MUST be done with PHP (HTML and CSS) only. I know this is possible with javascript but what is required by the webowner is to be javascript free.
Is this possible?
FYI - I am neither the programmer or website owner. I am the translator between them but I am confused what we can do and what we want to do.
**EDIT - Looks like the example of the placeholder text is not showing correctly on my phone. It should be:
underscore underscore hyphen underscore underscore hyphen underscore underscore underscore underscore