Resetting the form & setting values
Resetting the form​
The form can be reset via the native form.reset() method or via <button type="reset" />
and <input type="reset" />
.
<inform-el />
also has a reset()
which allows to specify new values while resetting.
When the form is reset, the fields are considered "untouched" again, which means that errors are hidden.
The "dirty" state is also reset.
Updating a value without reset​
<inform-el />
also has a setValues()
method. It is identical to using reset above, expect that it doesn't reset the "dirty" state, and the current errors remain displayed (fields stay "touched")"