How can I check a value entered in a field on my form is a number?

How can I check a value entered in a field on my form is a number?

You can do it client side with JavaScript or server side with php etc.

Are you using php, ASP etc. with your code or just HTML?

How do I make a website field mandatory?

As I posted on your earlier thread it depends on how you are coding your site - you need to put more information into your posts if you want a useful reply.

The best way is to make it mandatory with both JS client side and php server side. If you need code help then give a bit more info as to your requirements.

Threads merged as they seem to be related but will both require the same information supplied anyway.

in HTML5 you can do type=‘number’ in an input tag, keeping in mind not all browsers support html5, and form validation is VITAL

you can ad javascriptt fall backs,

but the SAFEST way is to check your data server side, if when the data is received and checks it is valid then you redirect the user to a new page… other wise you redisplay the form.

How you do his last part sever side will vary depending upon which server side language you are using.