Validatious 2.0

Easy form validation with unobtrusive JavaScript

Focusing fields

The default behaviour for the reporting module is to scroll the page to the first field/fieldset in the form that failed when the form is submitted. If you don't want this behaviour (which may be a good thing for long forms, but may be annoying on small forms), you can simply change v2.Form.prototype.scrollToFirstWhenFail to false.

Example

Unlike most other examples on this site, the following example will not scroll when you enter invalid data.


Back to Reporting extension features index

© 2008 Christian Johansen. Validatious is licensed with a BSD License, documentation and site content with CC Attribution-Share Alike. About.