PDA

View Full Version : How do I change bknd color in form elements when validating?


micdim
06-08-2009, 11:01 AM
I'm trying to use Validation Toolkit to change the background color of form elements that do not validate, after going on to the next field.

Example:
If a text field is required and you don't fill it in, the background text field will change to Red when you move the cursor to the next field, to indicate that you need to fill it in. Every field that is required will do the same thing. If you don't fill in the required fields, and press the submit button, then the pop-up error message comes up and tells you that the required fields (the ones that now have a red background) need to be filled in.

Does Validation Toolkit do this, or do I need to add other scripts to accomplish this.

Here's an example from Wabassist's Power Store Demo:
http://www.powerstore-demo.com/contactus.php

Your help is appreciated.

Ray Borduin
06-08-2009, 11:44 AM
We use spry validation for the client validation and Server Validation from validaiton toolkit in that example. Spry is the easiest way to get that effect.

Neil Beadle
06-10-2009, 04:05 PM
Check out this How To for guidance on applying various CSS styles to your form elements when validating.

http://assets.webassist.com/how-tos/vtk_applying_css_form_elements_ht.pdf