This tutorial will teach you how to use validation on your website.
In this example, we use an eCart form configured to use credit card payments. You do not need to use eCart for this tutorial, but we will be mentioning specific fields and some cool, advanced topics later on, so if you are following along with different forms, or using an eCart site configured with a different payment gateway setup, take note of the changes.
The first step that we're going to rock out is the creative portion of our quest. We need to add the error messages we want displayed after the fields we are validating. We're also formatting them to look all pretty so we can dazzle the people who fail at using our forms.
Now that you have those fancy pants errors for all the world to see, let's get our validati-on!
Add Form Data
Now we're going to show those validations that we set up ONLY when the user actually fails to enter the correct data in the field
When your form is submitted, if a validation is triggered all data will be lost when the page is reloaded. To fix this, we will set default values for all the fields that are equivalent to validated data. This way, if data has already been validated as correct, it will be retained in the fields
For text fields
For drop down lists
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.