Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Form Validation Code


DimeNote

Recommended Posts

Hello,

 

I'm trying to make a custom page that has several textboxes on it. I would like to learn how to validate these boxes when a user clicks the submit button. This is what I have in mind:

 

A form with 5 textboxes on it (first name, last name, email, and a textbox for the model number of a poduct along with a quantity box next to it). When the user fills out this information I need some code to validate that not only there is information in the name and email boxes but that the model number of the product they entered is a valid number. If all is well then the form gets processed. If all is not well I would like some sort of indicator to show up next to the invalid textboxes without the form refreshing itself and clearing the information. I would like the textboxes to stay populated so the user can see where/why it didn't go through.

 

 

If someone could show me how to go about something like this it would be greatly appreciated. I apologize in advance if I have missed a similar post on the forums... perhaps a push in the right direction?

 

Thanks.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...