Reset - Reset Input

This function allows you to reset the data entered by the user. The value must be bound in order to be reset. The form will then return to the state it was in before the user entered any data. The reset function can be triggered by the user, for example, via a button.

Example

reset.json
{
  "$schema": "https://forms.virtimo.net/4.2.x/schema.json",
  "metaData": {
    "id": 0,
    "version": 0
  },
  "configuration": {
  },
  "components": [
    {
      "type": "container",
      "label": "Reset Example",
      "components": [
        {
          "type": "checkbox",
          "label": "False After Reset",
          "value": "/data/0"
        },
        {
          "type": "checkbox",
          "label": "True After Reset",
          "value": "/data/1"
        },
        {
          "type": "textfield",
          "label": "Empty After Reset",
          "value": "/data/2"
        },
        {
          "type": "textfield",
          "label": "Hello After Reset",
          "value": "/data/3"
        },
        {
          "type": "button",
          "action": "reset",
          "label": "Reset Button"
        }
      ]
    }
  ],
  "state": {
    "data": {
      "0": false,
      "1": true,
      "2": "",
      "3": "Hello"
    }
  }
}
Embedded preview

Keywords: