angular icon indicating copy to clipboard operation
angular copied to clipboard

[BUG] Unable to refresh the screen after making form read-only after submit the form.

Open yarabsyp opened this issue 1 year ago • 1 comments

Environment

Please provide as many details as you can:

  • Hosting type
    • [x] Form.io
    • [ ] Local deployment
      • Version:
  • Formio.js version:5.0.0
  • Frontend framework: Angular
  • Browser: chrome
  • Browser version:

Steps to Reproduce

  1. create a form and create a submit button
  2. enter the data into the form
  3. Click on submit button

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;

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

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:

// your code here

yarabsyp avatar Apr 18 '24 22:04 yarabsyp

Could you possibly provide a code sandbox and/or video to help us reproduce the issue?

lane-formio avatar May 15 '24 13:05 lane-formio

Thank you for your contribution. As this issue has been inactive for over 90 days, I will close it for now. If you'd like to reopen the issue, please reply and we can resume the triage process.

olgabann avatar Sep 04 '24 13:09 olgabann