You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.
When I load a form, I can't load anything else that might be connected with it without creating a new Formio or setting static variables
ie.
const formio = new Formio(`${baseUrl}/form/${form}`);
// these works
await formio.loadForm()
await formio.loadRoles()
await formio.loadActions()
await formio.actionInfo(name);
// but these dont
await formio.loadRole();
await formio.loadAction();
// unless I
formio.actionId = "blah doesn't matter, just has to be true";
formio.actionUrl = `${baseUrl}/form/${formId}/action/${actionId}`;
await formio.loadAction();
// or create a new Formio with the url set to actionUrl or roleUrl
Expected behavior
// To reuse Formio object without doing
formio.actionId = "blah doesn't matter, just has to be true";
formio.actionUrl = `${baseUrl}/form/${formId}/action/${actionId}`;
// but instead
formio.loadAction(actionId);
Observed behavior
Its not working as I expect so I'm assuming I'm doing something wrong. Any advice to optimize my use of this great library?
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
The text was updated successfully, but these errors were encountered:
Environment
Please provide as many details as you can:
When I load a form, I can't load anything else that might be connected with it without creating a new Formio or setting static variables
ie.
Expected behavior
Observed behavior
Its not working as I expect so I'm assuming I'm doing something wrong. Any advice to optimize my use of this great library?
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
The text was updated successfully, but these errors were encountered: