resetForm() method

Reset the form
This method also clears all the messages, hide the feedback icons, etc.
resetForm(reset: Boolean): Core
ParameterTypeDescription
resetBooleanIf true, the method resets field value to empty or remove checked, selected attributes
Using the global script in the browser
const fv = FormValidation.formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv.resetForm(...);
Using the ES6 module
import { formValidation } from '/path/to/@form-validation/cjs/bundle/popular';
const fv = formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv.resetForm(...);
Using the npm package
import { formValidation } from '@form-validation/bundle/popular';
const fv = formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv.resetForm(...);

See also