Jump to content
  • 0

Allow numbers only in fields?


roattw

Question

I have a table field AGE set as an integer.  I need the form to disallow alpha characters in that field when exiting that field.  Cant get it to work.  I still have submissions allowing "approx. 50" and I need to limit them to discrete numbers only.

I added this script in footer, which helps, but its only on submit.  Isnt the fact that the field type is INTEGER mean it wont accept letters by default?

 

Can I use HTML5 to make it easy?

<input type="number" name="quantity" min="1" max="5">

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0
On 4/22/2017 at 9:55 PM, roattw said:

I have a table field AGE set as an integer.  I need the form to disallow alpha characters in that field when exiting that field.  Cant get it to work.  I still have submissions allowing "approx. 50" and I need to limit them to discrete numbers only.

I added this script in footer, which helps, but its only on submit.  Isnt the fact that the field type is INTEGER mean it wont accept letters by default?

 

Can I use HTML5 to make it easy?

<input type="number" name="quantity" min="1" max="5">

It seems that you posted your question twice. I replied here

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...