In Dreamweaver there is a very simple and easy way to apply form field validation and in this article I will so you exactly how to achieve this.
Step 1: Create the form with your required fields.
This is a simple html form which I am going to use for validation.
Step 2: Apply the validation to the form elements
When your form will be ready then go on Window Menu and select Behaviors from there. A window will be appear on your side panel there will be some other tabs like "Attributes", "Tags" and "Behaviors". Now select the Submit Button and click on "+" sign under the Behaviors tab. A window of behaviors will be open and you will find different behaviours which you can use for different tasks. Select "Validate Form" now.
Step 3: Select required validations for fields
This dialog will be open when you will select Validate Form behavior. Here you will see all text fields which you have used in contact form. Now select one by one field for validation and apply checks from under the "Fields" area. Here you will find following checks.
- Value Required: Check this if you want user must enter this field
- Accept: Here you will see different radio buttons with captions
- Anything: User can enter anything.
- Number: Only numbers will be entering.
- Email address: This check will be for email validation
- Number from: You can specify range of numbers.
Step 4: Test applied validation
After you have applied the Validation that you require, Save the Document and test it by not entering in anything into the fields. You should get a pop up box like this.
There we have it, you can now apply form validation to your Contact Forms.
great, thank you very much.
ReplyDeleteThis is such a great resource that you are providing and you give it away for free. I enjoy seeing websites that understand the value of providing a prime resource for free. I truly loved reading your post. Thanks!
ReplyDeleteKeep posting stuff like this i really like it
ReplyDeletereally useful and amazingly short training.
ReplyDeletenice post. thanks.
ReplyDeleteNice information, I really appreciate the way you presented.Thanks for sharing..
ReplyDeletenice post. thanks.
ReplyDeleteGood post and this mail helped me alot in my college assignement. Thanks you for your information.
ReplyDeleteI want to know that how we use more than one submit Email address in Form submit button. Like cc and bcc field.
ReplyDeleteI've done that, but if I leave more than one field blank, I get an alert box for each one which is very frustrating - can this be done on just one alert box..?? CS3
ReplyDeletethanks thats great! however, how can i do to add an automatic response or THANK YOU after submission?
ReplyDeleteWow. Thanks. That was very helpful. I've been trying to validate my forms for a while with little success. Much appreciated.
ReplyDelete