PDA

View Full Version : Form validation: How to get something more understated than the underline/outline?



timmc_basis
1 Nov 2012, 6:46 AM
The default form panel validation is pretty aggressive -- how can I tone down the feedback to perhaps just a red asterisk next to a field?

39744

Alternatively, is there a way to show the error messages when the user tries to click the "Save" button? I currently have formBind=true on the required field.

James Goddard
1 Nov 2012, 6:53 AM
First you would override the .x-form-invalid-field css class to remove the red borders.

Then I would recommend using msgTarget: side which would give you the exclamation point on the side with a hover showing the error. If you really want an asterisk instead of the exclamation point you could override .x-form-invalid-icon as well.

timmc_basis
1 Nov 2012, 11:04 AM
Thanks, that combination works wonderfully!