Custom Button to save bpmn generated json file to Database

Dear Team,
I have core application where I implemented bpm form.js form-js: Form viewer and builder | Toolkits |

Now I want to add one button, on click of that button I want to save generated json file to database.

Here is my working example:

    <div id="form"></div>
    <button id="customButton">Custom Button</button>
    <script type="application/form-schema">
          "schemaVersion": 1,
          "exporter": {
            "name": "form-js",
            "version": "0.1.0"
          "type": "default"

      required editor script
    <script src="~/js/workflow/form-editor.umd.js" asp-append-version="true"></script>

         document.getElementById('customButton').addEventListener('click', function ()
            const formValues = {};

            // Find all input elements inside the form
            $('.fjs-form-container .fjs-input').each(function ()
                const inputName = $(this).attr('name');
                const inputValue = $(this).val();
                formValues[inputName] = inputValue;

            console.log(JSON.stringify(formValues, null, 2));

        const schema = JSON.parse(

        const container = document.querySelector('#form');


Thanks in advance.

Hello @Anant_Jaiswal,

to achieve that you need use the saveSchema method from the form editor instance.

1 Like

Thank you so much @vsgoulart .
It helps.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.