uncleronin Posted February 16, 2007 Share Posted February 16, 2007 is it possible to create input masks without using javascript? I know a common practice is to split up textfields so that a user sort of gets an idea of what to expect. This and actually displaying the mask in both the textfield and the associated label [like D.O.B (dd/mm/yyyy): ...] are also useful but still don't stop stupid people from being stupid and misentering information or entering in letters were there should be only numbers. I guess what I'm really asking is if there is a way to either prevent certain characters from being entered AND enforcing that certain characters be entered in certain positions WITHOUT javascript? With javascript this is incredibly easy but without it all hell breaks loose *waves first at company with javascript enabled* Anybody got any ideas on the best non-JS 'inpuy masking' or on actual masking? *sigh* Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted February 16, 2007 Share Posted February 16, 2007 You can't do that client side BUT once the info is sent you should validate it in your script anyway - that is standrad practice for good code. If any of the data fails validation simply show teh form once more with the invaldi fields highlighted. Quote Link to comment Share on other sites More sharing options...
only one Posted February 16, 2007 Share Posted February 16, 2007 just array all the characters you dont want to let through.... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.