goog.dom.forms
Functions
focusAndSelect( el ) → void
void
Focuses, and optionally selects the content of, a form element.
Parameters |
|
---|
getFormDataMap( form ) → goog.structs.Map<string, Array<string>>
goog.structs.Map<string, Array<string>>
Returns form data as a map of name to value arrays. This doesn't support file inputs.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
getFormDataString( form ) → string
string
Returns the form data as an application/x-www-url-encoded string. This doesn't support file inputs.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
Returns the value of the named form field. In the case of radio buttons, returns the value of the checked button with the given name.
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
|
hasFileInput( form ) → boolean
boolean
Whether the form has a file input.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
hasValue( el ) → boolean
boolean
Whether a form element has a value.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
hasValueByName( form, name ) → boolean
boolean
setDisabled( el, disabled ) → void
void
Enables or disables either all elements in a form or a single form element.
Parameters |
|
---|
setValue( el, opt_value ) → void
void
Sets the current value of any element with a type.
Parameters |
|
---|
submitFormDataInNewWindow( actionUri, method, formData ) → boolean
boolean
Submits form data via a new window. This hides references to the parent window and should be used when submitting forms to untrusted 3rd party urls.
Parameters |
| ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
submitFormInNewWindow( form, opt_submitElement ) → boolean
boolean
Submits form data via a new window. This hides references to the parent window and should be used when submitting forms to untrusted 3rd party urls. By default, this uses the action and method of the specified form element. It is possible to override the default action and method if an optional submit element with formaction and/or formmethod attributes is provided.
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
| ||||||||
Throws |
|