Jump to content

[SOLVED] Setting condidtions for an input box


uwictech

Recommended Posts

I would say that you have 3 choices:

1. - Use javascript to control the format and data type (ie numeric only)

2.  - Alternatively you could provide 4 text boxes and set the maxlength on each one accordingly then, when the form is posted, join them up with php.  However, you would still need some javascript if you want to only allow them to input numbers.

3. - Finally this could be checked and controlled by php when the form is posted.  However, this means that you will have to show the form again if the number is incorrect and prefill all the fields with the data that the user has introduced.

 

Chris

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.