namespace Form.Element
Description
Utilities for dealing with form controls in the DOM.
This is a collection of methods that assist in dealing with form controls. They provide ways to focus, serialize, disable/enable or extract current value from a specific control.
Note that nearly all these methods are available directly on input
,
select
, and textarea
elements. Therefore, these are equivalent:
Form.Element.activate('myfield'); $('myfield').activate();
Naturally, you should always prefer the shortest form suitable in a situation. Most of these methods also return the element itself (as indicated by the return type) for chainability.
Classes
-
Form.Element.EventObserver
-
Form.Element.Observer
An
Abstract.TimedObserver
subclass that watches for changes to a form field's value. This triggers the callback when the form field's value (according toForm.Element.getValue
) changes. (Note that when the value actually changes can vary from browser to browser, particularly withselect
boxes.)