Widget hidden

Widget hidden

The hidden widget hides a form element.

Make sure to include it in the form section of the form definition. Else its value will not be included when the form is saved or submitted.

Example

{
    "schema": {
        "properties": {
            "myHiddenProperty": {
                "type": "string"
            }
        }
    },
    "form": [
        "myHiddenProperty"
    ],
    "uiSchema": {
        "myHiddenProperty": {
            "widget": "hidden"
        }
    },
    "formData": {
        "myHiddenProperty": "The value of the hidden property"
    }
}

The form field myHiddenProperty will be included in the form but it will be hidden. The value as given in the formData section will be included in the save/submit data of the form.