Class

FormClearEvent

@ng-forge/dynamic-forms

Event dispatched when the form should be cleared.

This event instructs the dynamic form component to clear all field values, resetting them to empty/undefined state regardless of their default values.

Signature

class FormClearEvent
  implements FormEvent

Properties

NameTypeDescription
type "form-clear"-

Examples

// Dispatch from a button component
eventBus.dispatch(FormClearEvent);
// Listen for clear events
eventBus.on<FormClearEvent>('form-clear').subscribe(() => {
  console.log('Form was cleared');
});