formio.js icon indicating copy to clipboard operation
formio.js copied to clipboard

Form Builder - How to import JSON data?

Open blakecodes opened this issue 4 years ago • 2 comments

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 avatar Nov 11 '20 19:11 blakecodes

@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 avatar Nov 16 '20 14:11 wag110894

@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.

bilogic avatar Sep 09 '22 14:09 bilogic

@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?

dgerbe avatar Sep 29 '22 13:09 dgerbe

Closing this thread as it is outdated. Please re-open if it is still relevant. Thank you for your contribution!

daneformio avatar Feb 14 '24 14:02 daneformio