Interface

FormOptions

@ng-forge/dynamic-forms

Global form configuration options.

Controls form-wide behavior including disabled state and button behavior configuration.

Signature

interface FormOptions

Properties

NameTypeDescription
disabled ?boolean

Disable the entire form.

When enabled, all form fields become read-only and cannot be modified by user interaction.

@value false

maxDerivationIterations ?number

Maximum number of iterations for derivation chain processing.

Derivations can trigger other derivations (e.g., A → B → C). This limit prevents infinite loops in case of circular dependencies that weren't caught at build time.

Increase this value if you have legitimate deep derivation chains (more than 10 levels deep).

submitButton ?SubmitButtonOptions

Default disabled behavior for submit buttons.

Controls when submit buttons are automatically disabled. Can be overridden per-button via the logic array on individual button fields.

nextButton ?NextButtonOptions

Default disabled behavior for next page buttons.

Controls when next page buttons are automatically disabled in paged forms. Can be overridden per-button via the logic array on individual button fields.

excludeValueIfHidden ?boolean

Whether to exclude values of hidden fields from submission output.

Overrides the global withValueExclusionDefaults() setting for this form. Can be further overridden per-field on individual FieldDef entries.

excludeValueIfDisabled ?boolean

Whether to exclude values of disabled fields from submission output.

Overrides the global withValueExclusionDefaults() setting for this form. Can be further overridden per-field on individual FieldDef entries.

excludeValueIfReadonly ?boolean

Whether to exclude values of readonly fields from submission output.

Overrides the global withValueExclusionDefaults() setting for this form. Can be further overridden per-field on individual FieldDef entries.

emitFormValueOnEvents ?boolean

Whether to attach the current form value to all events dispatched through the EventBus.

This per-form setting overrides the global withEventFormValue() feature: - true - Enable form value emission for this form (even if globally disabled) - false - Disable form value emission for this form (even if globally enabled) - undefined - Use global setting (default)

When enabled, events will include a formValue property with the current form state. Use the hasFormValue() type guard to safely access this property.

Examples

options: {
  disabled: false,
  submitButton: { disableWhenInvalid: true }
}