getData from multiple Instances not possible (since 2.10)
See original GitHub issueDescription:
With version 2.9.x I was able to do something like this:
jQuery(function($) {
var fbInstances = {
'buildWrap': $('#build-wrap').formBuilder(),
'header': $('#header').formBuilder(),
'content': $('#content').formBuilder(),
'footer': $('#footer').formBuilder(),
};
document.getElementById('getJSON').addEventListener('click', function() {
Object.keys(fbInstances).forEach(function(key){
console.log(key, fbInstances[key].actions.getData())
});
});
});
Multiple instances of formBuilder and one button to collect all the data.
Starting with 2.10 I can’t loop through the instances anymore and even fbInstances[key].promise(f => {f.actions.getData()});
results in nothing.
Here is a minimal testcase: https://codepen.io/localhorst/pen/dBorvL
For a single instance it seems to work, and the demo with multiple forms works as well (I updated it with the latest versions https://codepen.io/localhorst/pen/OeVGaZ)
But I can’t make it work in my case. Any help is appreciated!
Environment Details:
- formBuilder Version: 3.x (since 2.10)
- Browser: all
- OS: all
Expected Behavior
Get data from multiple instances via fbInstances[key].actions.getData()
Actual Behavior
actions.*
is not available
Steps to Reproduce
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:7
Top Results From Across the Web
Use IMDSv2 - Amazon Elastic Compute Cloud
Use Instance Metadata Service Version 2 (IMDSv2) to access instance metadata from an Amazon EC2 ... It is currently not available in the...
Read more >gpg failed to sign the data fatal: failed to write commit object ...
I uninstalled Git 2.8 (git-scm) on Windows. And installed 2.10. Now I get gpg failed to sign the data every time I use...
Read more >Confluence will not start due to fatal error in Confluence cluster
Confluence will not start due to fatal error in Confluence cluster ... Multiple instances of Confluence are deployed, connecting to the same database....
Read more >2.10.1 Initializing the Data Directory - MySQL :: Developer Zone
This section describes how to initialize the data directory manually for MySQL installation methods for which data directory initialization is not automatic.
Read more >Managing multiple Postfix instances on a single host
Multi -instance support is available with Postfix version 2.6 and later. ... Since there is no single right way to configure your system,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You can try it like this, Init by Recursive Function. https://codepen.io/chiahungwang/pen/PoYrMEZ?editors=1010
Solution here also https://github.com/kevinchappell/formBuilder/issues/1088#issuecomment-646232029