get_form_values
get_form_values Retrieves the values of a form within the application. Forms in the application are used to allow the user ot enter data (for example: name, address and phone number). Each form in the application stores the values entered into it and displays them whenever it is shown. The values stored in the form may be retrieved at any time via the get_form_values() function or changed via the set_form_values() function.
Form submission is not required
The values in a form are always available, weather or not the user has selected any kind of "submit" button. Sumitting a form normally would be the action that causes the values netered into the form to be accessed ( via get_form_values) andf then checked, used etc. Form fields that have not been provided will be null (same as false)
Format:
get_form_values(form_key)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| form_key | string | The identifier of the form element whose values are to be retrieved. |
Returned Value:
| Type | Description |
|---|---|
| array | The resulting values |
Examples
vals = get_form_values("form1085")
if (!vals.email) {
alert("You must submit an email!")
}