core.field.reset event

Triggered after reseting a field
The event is triggered after reseting a field via the resetField() method.
The event object contains the following properties:
PropertyTypeDescription
fieldStringThe field name
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.on('core.field.reset', function(event) {
...
});
Using the ES6 module
import { formValidation } from '/path/to/@form-validation/cjs/bundle/popular';
const fv = formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv.on('core.field.reset', function(event) {
...
});
Using the npm package
import { formValidation } from '@form-validation/bundle/popular';
const fv = formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv.on('core.field.reset', function(event) {
...
});