Jump to content

how to insert numbers on this?


brunoacb21

Recommended Posts

Can someone help me with this? Im a little lost because i want to change that input to one that lets you insert numbers on it. That one doesnt.

Thanks in advance.

 

<input name="txtName" type="text" id="txtName" class="" autocomplete="off" value="" required="" placeholder="" data-regex="^[a-zA-Z]{0,10}$" regex="^[a-zA-Z]{0,10}$" maxlength="10">

Link to comment
Share on other sites

IF this is done through JavaScript you need to provide code. IF HTML5 attribute pattern which works for modern browsers  you can use

	pattern="[a-zA-Z0-9]+"
	

Which allows alphanumeric characters only, (no special characters) uppercase and lower

 

Link to comment
Share on other sites

Hello,

I think you should try as per the following way:

<input name="txtName" type="text" id="txtName" class="" autocomplete="off" value="" required="" placeholder="" pattern="[a-zA-Z0-9]+" maxlength="10">

 

Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...