Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Form Validation Code


DimeNote

Recommended Posts

Posted

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.

Posted

Anyone? I've been looking at the code that is in the create account page... is this code similar to what I'm trying to achieve?

 

Thanks.

Posted

I've been trying to play with the code from the create account page... can't get it to work. I know I'm missing something.

 

Please, anyone?

Posted
Please, anyone?

 

 

I really could use some guidance here. If anyone has even the slightest idea of where to look for further information on this I would really appreciate the information.

 

Thanks.

Archived

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

×
×
  • Create New...