ng-dynamic-forms
ng-dynamic-forms copied to clipboard
Edit/Display modes
I'm submitting a
[ ] Bug / Regression
[ ] Feature Request / Proposal
I'm using
NG Dynamic Forms Version: `X.Y.Z`
[ ] Basic UI
[ ] Bootstrap UI
[ ] Foundation UI
[ ] Ionic UI
[ ] Kendo UI
[ ] Material
[ ] NG Bootstrap
[ x] Prime NG
Description
Thanks for this library its awesome. I need to implement 2 modes in my form, Edit and Display. Edit is a normal form, and Display would just display all your form labels and input contents but will be non editable. Is there an easy way to implement something like this with this library?
A possible solution could be something like this:
disableForm() {
this.formModel.forEach( (model: DynamicFormControlModel) => {
model.disabled = true;
});
this.formService.detectChanges();
}
see (https://github.com/udos86/ng-dynamic-forms/issues/1099#issuecomment-675989769) also relations can overwrite the desired behavior