formio.js
formio.js copied to clipboard
Form Builder - How to import JSON data?
Hello,
How do you import JSON back into the form builder?
For example, we need to build out a form, save off the JSON and then open the form back up in the builder. Is there a way to set a data property as a part of Formio.FormBuilder?
@blakecodes, you can accomplish this by using Postman and rePosting the updated form back onto the form.
You can also drag over a component over and then edit the JSON for any new components and that should work as well.
@wag110894
var builder = new Formio.FormBuilder(document.getElementById("builder"), {}, {}); // created an empty builder FIRST
// ... much much later
// what code can we write here to import a JSON into variable builder to overwrite whatever was already there?
Thank you.
@blakecodes, you can accomplish this by using Postman and rePosting the updated form back onto the form.
You can also drag over a component over and then edit the JSON for any new components and that should work as well.
Can you please give an example of this?
Closing this thread as it is outdated. Please re-open if it is still relevant. Thank you for your contribution!