Basics
Events
Layout
Advanced Modeling
Disable
You can disable the entire form or a specific subset of controls in the form.
Disable specific control
To mark controls as disabled, provide a list of form control identifiers to nForm:
<pbl-nform [disabledState]="disabled"></pbl-nform>
where disabled
is string[]
.
nForm supports array diffing so you can mutate the existing array, or replace it on every change...
The disabled state is managed by
@angular/forms
, nForm will propagate the state to the form controls.
Disable the Form
To disable the entire form you can use the [disabled] @Input
.
<pbl-nform [model]="model" disabled></pbl-nform>