-
Notifications
You must be signed in to change notification settings - Fork 0
Basic form JSON example
This a basic example of form with 1 section and two fields.
First field "name" is a normal text input field. The field has "required" property set to true, which marks the field as required field in form.
Second field "status" is a radio list field with options Pending, In progress and Done.
First field is marked to be visible in scopes FORM, MANAGEMENT and MANAGEMENT_LIST. This means that the field will be visible for user (FORM scope), in administration console form view (MANAGEMENT scope) and it also will be listed in administration console list view (MANAGEMENT_LIST). Basically this field is marked to be visible in all default scopes, so same functionality could be achieved by using null scope.
Second field is only visible on MANAGEMENT_LIST and MANAGEMENT scopes. This means that the field is NOT visible for users but is visible on administration console list and form.
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"replyStrategy": null,
"exportThemeId": null,
"allowAnonymous": true,
"allowDrafts": null,
"title": "Form title",
"sections": [
{
"title": "Section title",
"visibleIf": null,
"fields": [
{
"visibleIf": null,
"permissionContexts": null,
"name": "name",
"type": "text",
"title": "Name",
"required": true,
"contexts": [
"MANAGEMENT",
"FORM"
],
"flags": null,
"placeholder": "John Doe",
"readonly": null,
"help": null,
"min": null,
"max": null,
"step": null,
"checked": null,
"printable": null,
"options": [],
"sourceUrl": null,
"uploadUrl": null,
"singleFile": null,
"onlyImages": null,
"maxFileSize": null,
"addRows": null,
"draggable": null,
"columns": [],
"src": null,
"text": null,
"html": null,
"_class": null,
"_default": null
},
{
"visibleIf": null,
"permissionContexts": null,
"name": "status",
"type": "radio",
"title": "Status",
"required": null,
"contexts": [
"MANAGEMENT_LIST",
"MANAGEMENT"
],
"flags": null,
"placeholder": null,
"_class": null,
"readonly": null,
"help": null,
"_default": null,
"min": null,
"max": null,
"step": null,
"checked": null,
"printable": null,
"options": [
{
"name": "pending",
"text": "Pending",
"checked": true,
"selected": null
},
{
"name": "inprogress",
"text": "In progress",
"checked": null,
"selected": null
},
{
"name": "done",
"text": "Done",
"checked": null,
"selected": null
}
],
"sourceUrl": null,
"uploadUrl": null,
"singleFile": null,
"onlyImages": null,
"maxFileSize": null,
"addRows": null,
"draggable": null,
"columns": [],
"src": null,
"text": null,
"html": null
}
]
}
],
"filters": [ ],
"scripts": null
}