Prototype - Form.Element Management
Form.emement is a submodule of Form which deals with specific form controls on INPUT, SELECT and TEXTAREA elements.
Form.Element is also aliased Field. Following two forms are equivalent −
Form.Element.activate('myfield') is equivalent to: Field.activate('myfield'); Which in turn equivalent to: $('myfield').activate()
Here is a complete list of all the methods related to Form.Element.
Prototype Event Methods
NOTE − Make sure you at least have the version 1.6 of prototype.js.
|S.No.||Method & Description|
Gives focus to a form control and selects its contents if it is a text input.
Clears the contents of a text input.
Disables a form control, effectively preventing its value to be changed until it is enabled again.
Enables a previously disabled form control.
Gives keyboard focus to an element.
Returns the current value of a form control. A string is returned for most controls; only multiple select boxes return an array of values. The global shortcut for this method is $F().
Returns true if a text input has contents, false otherwise.
Selects the current text in a text input.
Creates an URL-encoded string representation of a form control in the name=value format.