Skip to content

Commit

Permalink
FIO-7110 Fixed the display of the Nested Form with Use Original Revis…
Browse files Browse the repository at this point in the history
…ion on PDF download
  • Loading branch information
HannaKurban authored and lane-formio committed Dec 14, 2023
1 parent 433bab2 commit a399f85
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/form/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ export default class FormComponent extends Component {
}

if (this.hasLoadedForm && !this.isRevisionChanged &&
!(this.options.pdf && this.useOriginalRevision && _.isNull(this.subForm) && !this.subFormLoading)
!(this.options.pdf && this.component?.useOriginalRevision && _.isNull(this.subForm) && !this.subFormLoading)
) {
// Pass config down to sub forms.
if (this.root && this.root.form && this.root.form.config && !this.formObj.config) {
Expand All @@ -491,6 +491,9 @@ export default class FormComponent extends Component {
return (new Formio(this.formSrc)).loadForm({ params: { live: 1 } })
.then((formObj) => {
this.formObj = formObj;
if (this.options.pdf && this.component.useOriginalRevision) {
this.formObj.display = 'form';
}
this.subFormLoading = false;
return formObj;
})
Expand Down

0 comments on commit a399f85

Please sign in to comment.