Skip to content

Commit

Permalink
add example for required fields
Browse files Browse the repository at this point in the history
  • Loading branch information
gsambrotta committed Jan 20, 2025
1 parent c50db24 commit 7f5671b
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions docs/workflow/blocks/form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,9 @@ An example of the array type in action is `here <https://app.kendra.io/bandsinto
},
"name": {
"type": "string"
},
"active": {
"type": "boolean"
}
}
}
Expand Down Expand Up @@ -369,6 +372,32 @@ Display a field in read-only mode (not editable)
"uiSchema": {}
}
Required fields
^^^^^^^^^^^^^^^
Make a field required
.. code-block:: json
{
"type": "form",
"label": "Search",
"jsonSchema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "Name"
},
"age": {
"type": "string",
"title": "Age"
}
},
"required": ["name"] // 'name' is required, 'age' is optional
},
"uiSchema": {}
}
No submit button
^^^^^^^^^^^^^^^^
Expand Down

0 comments on commit 7f5671b

Please sign in to comment.