instance method Form.Element#getValue
Returns the current value of a form control.
A string is returned for most controls; only multiple
return an array of values.
The global shortcut for this method is
How to reference form controls by their name
For example, if you have an
input named "company" in a
form with an
var form = $('contact'); var input = form['company']; Form.Element.getValue(input); // but, the preferred call is: $(input).getValue(); // we used the $() method so the node gets extended // you can also use the shortcut $F(input);
An error is thrown ("element has no properties") if the
is an unknown ID.
This method can be called either as an instance method or as a generic method. If calling as a generic, pass the instance in as the first argument.