Get Form schema on clicking a button outside of the form and post that form through ajax using FORM IO

46 views Asked by At

I am using formio (https://formio.github.io/formio.js/app/sandbox.html) for one of my project and I have a requirement around saving the form schema on clicking a button outside the form.

I have created a fiddle here - https://jsfiddle.net/wrLf5q3v/2/

I want the form JSON schema when I click on Get JSON Schema button on top.

The form schema looks something like this -

{
  "display": "form",
  "components": [
    {
      "label": "Text Field",
      "applyMaskOn": "change",
      "tableView": true,
      "key": "textField",
      "type": "textfield",
      "input": true
    },
    {
      "label": "Text Area",
      "applyMaskOn": "change",
      "autoExpand": false,
      "tableView": true,
      "key": "textArea",
      "type": "textarea",
      "input": true
    },
    {
      "type": "button",
      "label": "Submit",
      "key": "submit",
      "disableOnInvalid": true,
      "input": true,
      "tableView": false
    }
  ]
}
0

There are 0 answers