Open yarabsyp opened 1 month ago
Please provide as many details as you can:
form should need to be read only with the given data
form is still editable , form is not changing to read only
Code in Ts
onSubmit(value: any) { console.log('onSubmit'); console.log(value); this.readOnly = true;
this.formio.formioReady.then(() => { this.formio.formio.disabled = true; this.formio.formio.components.forEach((comp: any) => comp.disabled = true); this.formio.formio.viewOnly = true; }); this.submissionDone.emit(true);
}
in HTML
<formio [form]="form" [submitDone]="submissionDone" [readOnly]="readOnly" (render)="onRender()" [refresh]="refreshForm" (submit)="onSubmit($event)" (change)="onChange($event)" #formio
If possible, please provide a screenshot, live example (via JSFiddle or similar), and/or example code to help demonstrate the issue.
For code or form JSON, please enclose in a code block:
// your code here
Could you possibly provide a code sandbox and/or video to help us reproduce the issue?
Environment
Please provide as many details as you can:
Steps to Reproduce
Expected behavior
form should need to be read only with the given data
Observed behavior
form is still editable , form is not changing to read only
Code in Ts
onSubmit(value: any) { console.log('onSubmit'); console.log(value); this.readOnly = true;
}
in HTML
<formio [form]="form" [submitDone]="submissionDone"
[readOnly]="readOnly" (render)="onRender()" [refresh]="refreshForm" (submit)="onSubmit($event)" (change)="onChange($event)" #formio
Example
If possible, please provide a screenshot, live example (via JSFiddle or similar), and/or example code to help demonstrate the issue.
For code or form JSON, please enclose in a code block: