formBuilder icon indicating copy to clipboard operation
formBuilder copied to clipboard

Support loading output from formRender inc. userData into formBuilder

Open jokamax opened this issue 5 years ago • 1 comments

Description:

I use my forms in all directions :

  1. I create a form

  2. Save the form with : formBuilderInstance.actions.getData('json', true)

  3. Show it to the users : formBuilderInstance.formRender(formRenderOpts);

  4. Save complete form with : var content = JSON.stringify(formBuilderInstance.formRender('userData')); This contain ["Form" + "userData"] -> OK

  5. I give my users possibility to add/remove a field, then I use : formBuilder.actions.setData(content );

Problem : loading is workging BUT userData is totally lost

Is there a way to preserve userData inside the form "builder", even if it keep invisible or in a special field ?

Environment Details:

  • formBuilder Version: 3.2.4

jokamax avatar Jun 25 '19 06:06 jokamax

This isn't a supported use case

userData is only used by formRender. For text inputs you could map the userData back to the value attribute however for select/checkbox/radio you would need to map the selected state back to the options array.

lucasnetau avatar Aug 24 '23 06:08 lucasnetau