JavaScript

A5.form.submitReset Method

Do not use this method to reset a UX or Grid component. Use the {dialog.object}.resetForm and Grid object reset methods instead.

Syntax

A5.form.submitReset(form_id [, keepOldValues]);

Arguments

form_idstring

The ID of the form to submit.

keepOldValuesboolean

Indicates whether or not the original values should be used when the form is reset. If true, the form will be populated with the original values.

Description

Submits and resets the form.

Discussion

This is similar to A5.form.prepare(), however, it does not create the events or attributes. If the form was prepared previously, this function will reset all "a5isdirty" attributes to "false" and set all "a5originalvalue" attributes to the current value in the control. This is a useful function to run after a form is "cleared"

If keepOldValues is true, then the controls in the form are reset to the original values when the form was originally prepared.