jQuery-Form-Element-Repeater-Plugin
jQuery-Form-Element-Repeater-Plugin copied to clipboard
repopulate data
I really like the simplicity of this script, I came across it looking for a method of repopulating repeated forms from the database.
Would it be terribly hard to provide an optional json feed and have the form reflect the entries?
I would suggest someone open a pull request to also accept a promise as the third param. Add accompanying handling to check whether param 3 is an array or a promise and handle accordingly. This would allow you to perform an AJAX request to retrieve data on the fly. The resulting value of the promise should match the existing formatting of the third values param as outlined in the documentation.
Why would we need to adjust the library to make this work? What's the issue with reinitiating once the values are available?
/ #