Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm global, that is strange. how many of these 'gotchas' have we come accross.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this actual did fix in few places, as in formio.js, there are few ocassions using
Formio.getProjectUrl
to contruct URL for internal request, such as PDF, nested Form, Select (using data resource). (not every component using this method to construct URL tho, eg. ReCaptcha)by adding
Formio.setProjectUrl
in pre-request hook, hence update the global Formio just before the request, luckily we still can support multiple forms with this patch.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing the discovery, could you raise and issue on the formio js upstream project with examples where they missed local variable instead of global with the proviso to doing multi form on one page with different 'stages/projects'