Skip to main content

clear()

clears a form

clear(method?: ClearMethod): void;

Parameters:

method: string - optional, the method of clearing a form

Example

// clears only form validationform.clear("validation");
// clears only form valuesform.clear("value");
// clears both form values and validationform.clear();

Related sample: Form. Clear

The method may clear a form in one of three ways:

  • "value" - clears only form values
  • "validation" - clears only form validation
  • without parameters - clears both form values and validation

Change log:

added in v6.1