From 5c6e1117e18059ab2786f3287f5471294b26a915 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cbhuvan-aot=E2=80=9D?= <“bhuvanesh.p@aot-technologies.com”> Date: Fri, 15 Mar 2024 15:36:25 -0700 Subject: [PATCH 1/5] Add documentation to create a form using JSON with minimum fields. --- .../Importing-and-exporting-form-designs.md | 10 + .../examples/full_schema_JSON_file.json | 1181 +++++++++++++++++ .../examples/minimum_schema_JSON_file.json | 112 ++ 3 files changed, 1303 insertions(+) create mode 100644 docs/Capabilities/Functionalities/examples/full_schema_JSON_file.json create mode 100644 docs/Capabilities/Functionalities/examples/minimum_schema_JSON_file.json diff --git a/docs/Capabilities/Functionalities/Importing-and-exporting-form-designs.md b/docs/Capabilities/Functionalities/Importing-and-exporting-form-designs.md index f576b18..d977dbb 100644 --- a/docs/Capabilities/Functionalities/Importing-and-exporting-form-designs.md +++ b/docs/Capabilities/Functionalities/Importing-and-exporting-form-designs.md @@ -33,5 +33,15 @@ To export a form: Exporting forms is a great way to copy an existing design or share it with others. + +## Creating a form using JSON with minimum fields. +CHEFS Form.io platform provides a visual form builder that lets you drag and drop form elements, and automatically generates the corresponding JSON schema for you. Every component and layouts in CHEFS are represented as JSON in the background. + +If for any reason if you would like to create the forms using the JSON Schema instead of visual form builder, below are some JSON schemas for some components with minimum mandatory variables and full schema. + +|Form |Minimum Schema|Full schema| +|---|---|---| +|[Basic components with Layouts](https://submit.digital.gov.bc.ca/app/form/submit?f=0da54bf6-2951-4579-8426-76565137f395)|[Minimum Schema JSON file](examples/minimum_schema_JSON_file.json)|[Full Schema JSON file](examples/full_schema_JSON_file.json)| + *** [Terms of Use](Terms-of-Use) | [Privacy](Privacy) | [Security](Security) | [Service Agreement](Service-Agreement) | [Accessibility](Accessibility) \ No newline at end of file diff --git a/docs/Capabilities/Functionalities/examples/full_schema_JSON_file.json b/docs/Capabilities/Functionalities/examples/full_schema_JSON_file.json new file mode 100644 index 0000000..6716955 --- /dev/null +++ b/docs/Capabilities/Functionalities/examples/full_schema_JSON_file.json @@ -0,0 +1,1181 @@ +{ + "display":"form", + "type":"form", + "components":[ + { + "type":"simplecontent", + "label":"Text/Images", + "key":"placeholder_key1", + "id":"ezi27k", + "html":"

Placeholder heading 1

", + "input":false, + "placeholder":"", + "prefix":"", + "customClass":"", + "suffix":"", + "multiple":false, + "defaultValue":null, + "protected":false, + "unique":false, + "persistent":true, + "hidden":false, + "clearOnHide":true, + "refreshOn":"", + "redrawOn":"", + "tableView":false, + "modalEdit":false, + "dataGridLabel":false, + "labelPosition":"top", + "description":"", + "errorLabel":"", + "tooltip":"", + "hideLabel":false, + "tabindex":"", + "disabled":false, + "autofocus":false, + "dbIndex":false, + "customDefaultValue":"", + "calculateValue":"", + "calculateServer":false, + "widget":null, + "attributes":{ + }, + "validateOn":"change", + "validate":{ + "required":false, + "custom":"", + "customPrivate":false, + "strictDateValidation":false, + "multiple":false, + "unique":false + }, + "conditional":{ + "show":null, + "when":null, + "eq":"" + }, + "overlay":{ + "style":"", + "left":"", + "top":"", + "width":"", + "height":"" + }, + "allowCalculateOverride":false, + "encrypted":false, + "showCharCount":false, + "showWordCount":false, + "properties":{ + }, + "allowMultipleMasks":false, + "addons":[] + }, + { + "id":"el63ab", + "key":"placeholder_keytabs", + "type":"tabs", + "label":"Tabs", + "components":[ + { + "label":"basic fields Tab", + "key":"tab1", + "components":[ + { + "label":"Text Field", + "id":"erxc6nc", + "key":"placeholder_key2", + "type":"simpletextfieldadvanced", + "input":true, + "placeholder":"", + "prefix":"", + "customClass":"", + "suffix":"", + "multiple":false, + "defaultValue":null, + "protected":false, + "unique":false, + "persistent":true, + "hidden":false, + "clearOnHide":true, + "refreshOn":"", + "redrawOn":"", + "tableView":true, + "modalEdit":false, + "dataGridLabel":false, + "labelPosition":"top", + "description":"", + "errorLabel":"", + "tooltip":"", + "hideLabel":false, + "tabindex":"", + "disabled":false, + "autofocus":false, + "dbIndex":false, + "customDefaultValue":"", + "calculateValue":"", + "calculateServer":false, + "widget":{ + "type":"input" + }, + "attributes":{ + }, + "validateOn":"change", + "validate":{ + "required":false, + "custom":"", + "customPrivate":false, + "strictDateValidation":false, + "multiple":false, + "unique":false, + "minLength":"", + "maxLength":"", + "pattern":"" + }, + "conditional":{ + "show":null, + "when":null, + "eq":"" + }, + "overlay":{ + "style":"", + "left":"", + "top":"", + "width":"", + "height":"" + }, + "allowCalculateOverride":false, + "encrypted":false, + "showCharCount":false, + "showWordCount":false, + "properties":{ + }, + "allowMultipleMasks":false, + "addons":[], + "mask":false, + "inputType":"text", + "inputFormat":"plain", + "inputMask":"", + "displayMask":"", + "spellcheck":true, + "truncateMultipleSpaces":false + }, + { + "label":"Text Area", + "key":"placeholder_key3", + "type":"simpletextareaadvanced", + "id":"eash1ah", + "input":true, + "placeholder":"", + "prefix":"", + "customClass":"", + "suffix":"", + "multiple":false, + "defaultValue":null, + "protected":false, + "unique":false, + "persistent":true, + "hidden":false, + "clearOnHide":true, + "refreshOn":"", + "redrawOn":"", + "tableView":true, + "modalEdit":false, + "dataGridLabel":false, + "labelPosition":"top", + "description":"", + "errorLabel":"", + "tooltip":"", + "hideLabel":false, + "tabindex":"", + "disabled":false, + "autofocus":false, + "dbIndex":false, + "customDefaultValue":"", + "calculateValue":"", + "calculateServer":false, + "widget":{ + "type":"input" + }, + "attributes":{ + }, + "validateOn":"change", + "validate":{ + "required":false, + "custom":"", + "customPrivate":false, + "strictDateValidation":false, + "multiple":false, + "unique":false, + "minLength":"", + "maxLength":"", + "pattern":"", + "minWords":"", + "maxWords":"" + }, + "conditional":{ + "show":null, + "when":null, + "eq":"" + }, + "overlay":{ + "style":"", + "left":"", + "top":"", + "width":"", + "height":"" + }, + "allowCalculateOverride":false, + "encrypted":false, + "showCharCount":false, + "showWordCount":false, + "properties":{ + }, + "allowMultipleMasks":false, + "addons":[], + "mask":false, + "inputType":"text", + "inputFormat":"html", + "inputMask":"", + "displayMask":"", + "spellcheck":true, + "truncateMultipleSpaces":false, + "rows":3, + "wysiwyg":false, + "editor":"", + "fixedSize":true + }, + { + "label":"Date / Time", + "key":"placeholder_key4", + "type":"simpledatetimeadvanced", + "id":"e7qio85", + "input":true, + "placeholder":"", + "prefix":"", + "customClass":"", + "suffix":"", + "multiple":false, + "defaultValue":"", + "protected":false, + "unique":false, + "persistent":true, + "hidden":false, + "clearOnHide":true, + "refreshOn":"", + "redrawOn":"", + "tableView":false, + "modalEdit":false, + "dataGridLabel":false, + "labelPosition":"top", + "description":"", + "errorLabel":"", + "tooltip":"", + "hideLabel":false, + "tabindex":"", + "disabled":false, + "autofocus":false, + "dbIndex":false, + "customDefaultValue":"", + "calculateValue":"", + "calculateServer":false, + "widget":{ + "type":"calendar", + "displayInTimezone":"viewer", + "locale":"en", + "useLocaleSettings":false, + "allowInput":true, + "mode":"single", + "enableTime":true, + "noCalendar":false, + "format":"yyyy-MM-dd hh:mm a", + "hourIncrement":1, + "minuteIncrement":1, + "time_24hr":false, + "minDate":null, + "maxDate":null + }, + "attributes":{ + }, + "validateOn":"change", + "validate":{ + "required":false, + "custom":"", + "customPrivate":false, + "strictDateValidation":false, + "multiple":false, + "unique":false + }, + "conditional":{ + "show":null, + "when":null, + "eq":"" + }, + "overlay":{ + "style":"", + "left":"", + "top":"", + "width":"", + "height":"" + }, + "allowCalculateOverride":false, + "encrypted":false, + "showCharCount":false, + "showWordCount":false, + "properties":{ + }, + "allowMultipleMasks":false, + "addons":[], + "format":"yyyy-MM-dd hh:mm a", + "useLocaleSettings":false, + "allowInput":true, + "enableDate":true, + "enableTime":true, + "defaultDate":"", + "displayInTimezone":"viewer", + "timezone":"", + "datepickerMode":"day", + "datePicker":{ + "showWeeks":true, + "startingDay":0, + "initDate":"", + "minMode":"day", + "maxMode":"year", + "yearRows":4, + "yearColumns":5, + "minDate":null, + "maxDate":null + }, + "timePicker":{ + "hourStep":1, + "minuteStep":1, + "showMeridian":true, + "readonlyInput":false, + "mousewheel":true, + "arrowkeys":true + }, + "customOptions":{} + } + ] + }, + { + "label":"layouts tab", + "key":"tab2", + "components":[ + { + "type":"panel", + "title":"Validation Fields", + "components":[ + { + "label":"Email", + "key":"placeholder_key7", + "type":"simpleemailadvanced", + "id":"ewzt4f", + "input":true, + "placeholder":"", + "prefix":"", + "customClass":"", + "suffix":"", + "multiple":false, + "defaultValue":null, + "protected":false, + "unique":false, + "persistent":true, + "hidden":false, + "clearOnHide":true, + "refreshOn":"", + "redrawOn":"", + "tableView":true, + "modalEdit":false, + "dataGridLabel":false, + "labelPosition":"top", + "description":"", + "errorLabel":"", + "tooltip":"", + "hideLabel":false, + "tabindex":"", + "disabled":false, + "autofocus":false, + "dbIndex":false, + "customDefaultValue":"", + "calculateValue":"", + "calculateServer":false, + "widget":{ + "type":"input" + }, + "attributes":{ + }, + "validateOn":"change", + "validate":{ + "required":false, + "custom":"", + "customPrivate":false, + "strictDateValidation":false, + "multiple":false, + "unique":false, + "minLength":"", + "maxLength":"", + "pattern":"" + }, + "conditional":{ + "show":null, + "when":null, + "eq":"" + }, + "overlay":{ + "style":"", + "left":"", + "top":"", + "width":"", + "height":"" + }, + "allowCalculateOverride":false, + "encrypted":false, + "showCharCount":false, + "showWordCount":false, + "properties":{ + }, + "allowMultipleMasks":false, + "addons":[], + "mask":false, + "inputType":"email", + "inputFormat":"plain", + "inputMask":"", + "displayMask":"", + "spellcheck":true, + "truncateMultipleSpaces":false, + "kickbox":{ + "enabled":false} + }, + { + "label":"Phone Number", + "key":"placeholder_key10", + "type":"simplephonenumberadvanced", + "id":"ez8epyb", + "input":true, + "placeholder":"", + "prefix":"", + "customClass":"", + "suffix":"", + "multiple":false, + "defaultValue":null, + "protected":false, + "unique":false, + "persistent":true, + "hidden":false, + "clearOnHide":true, + "refreshOn":"", + "redrawOn":"", + "tableView":true, + "modalEdit":false, + "dataGridLabel":false, + "labelPosition":"top", + "description":"", + "errorLabel":"", + "tooltip":"", + "hideLabel":false, + "tabindex":"", + "disabled":false, + "autofocus":false, + "dbIndex":false, + "customDefaultValue":"", + "calculateValue":"", + "calculateServer":false, + "widget":{ + "type":"input" + }, + "attributes":{ + }, + "validateOn":"change", + "validate":{ + "required":false, + "custom":"", + "customPrivate":false, + "strictDateValidation":false, + "multiple":false, + "unique":false, + "minLength":"", + "maxLength":"", + "pattern":"" + }, + "conditional":{ + "show":null, + "when":null, + "eq":"" + }, + "overlay":{ + "style":"", + "left":"", + "top":"", + "width":"", + "height":"" + }, + "allowCalculateOverride":false, + "encrypted":false, + "showCharCount":false, + "showWordCount":false, + "properties":{ + }, + "allowMultipleMasks":false, + "addons":[], + "mask":false, + "inputType":"tel", + "inputFormat":"plain", + "inputMask":"(999) 999-9999", + "displayMask":"", + "spellcheck":true, + "truncateMultipleSpaces":false, + "inputMode":"decimal" + }, + { + "label":"Currency", + "key":"placeholder_key12", + "type":"simplecurrencyadvanced", + "id":"evygh9f", + "delimiter":true, + "input":true, + "placeholder":"", + "prefix":"", + "customClass":"", + "suffix":"", + "multiple":false, + "defaultValue":null, + "protected":false, + "unique":false, + "persistent":true, + "hidden":false, + "clearOnHide":true, + "refreshOn":"", + "redrawOn":"", + "tableView":false, + "modalEdit":false, + "dataGridLabel":false, + "labelPosition":"top", + "description":"", + "errorLabel":"", + "tooltip":"", + "hideLabel":false, + "tabindex":"", + "disabled":false, + "autofocus":false, + "dbIndex":false, + "customDefaultValue":"", + "calculateValue":"", + "calculateServer":false, + "widget":{ + "type":"input" + }, + "attributes":{ + }, + "validateOn":"change", + "validate":{ + "required":false, + "custom":"", + "customPrivate":false, + "strictDateValidation":false, + "multiple":false, + "unique":false, + "min":"", + "max":"", + "step":"any", + "integer":"" + }, + "conditional":{ + "show":null, + "when":null, + "eq":"" + }, + "overlay":{ + "style":"", + "left":"", + "top":"", + "width":"", + "height":"" + }, + "allowCalculateOverride":false, + "encrypted":false, + "showCharCount":false, + "showWordCount":false, + "properties":{ + }, + "allowMultipleMasks":false, + "addons":[] + } + ], + "id":"e29lu6f", + "input":false, + "key":"panel", + "placeholder":"", + "prefix":"", + "customClass":"", + "suffix":"", + "multiple":false, + "defaultValue":null, + "protected":false, + "unique":false, + "persistent":false, + "hidden":false, + "clearOnHide":false, + "refreshOn":"", + "redrawOn":"", + "tableView":false, + "modalEdit":false, + "label":"Panel", + "dataGridLabel":false, + "labelPosition":"top", + "description":"", + "errorLabel":"", + "tooltip":"", + "hideLabel":false, + "tabindex":"", + "disabled":false, + "autofocus":false, + "dbIndex":false, + "customDefaultValue":"", + "calculateValue":"", + "calculateServer":false, + "widget":null, + "attributes":{ + }, + "validateOn":"change", + "validate":{ + "required":false, + "custom":"", + "customPrivate":false, + "strictDateValidation":false, + "multiple":false, + "unique":false + }, + "conditional":{ + "show":null, + "when":null, + "eq":"" + }, + "overlay":{ + "style":"", + "left":"", + "top":"", + "width":"", + "height":"" + }, + "allowCalculateOverride":false, + "encrypted":false, + "showCharCount":false, + "showWordCount":false, + "properties":{ + }, + "allowMultipleMasks":false, + "addons":[], + "tree":false, + "lazyLoad":false, + "theme":"default", + "breadcrumb":"default" + }, + { + "type":"columns", + "label":"Columns", + "key":"placeholder_key04", + "id":"eemrfk5", + "columns":[ + { + "components":[ + { + "label":"Select", + "data":{ + "values":[ + { + "label":"option 1", + "value":"option1" + }, + { + "label":"option 2", + "value":"option2" + } + ], + "json":"", + "url":"", + "resource":"", + "custom":"" + }, + "key":"placeholder_key5", + "type":"simpleselectadvanced", + "id":"e00b3jr", + "input":true, + "placeholder":"", + "prefix":"", + "customClass":"", + "suffix":"", + "multiple":false, + "defaultValue":null, + "protected":false, + "unique":false, + "persistent":true, + "hidden":false, + "clearOnHide":true, + "refreshOn":"", + "redrawOn":"", + "tableView":true, + "modalEdit":false, + "dataGridLabel":false, + "labelPosition":"top", + "description":"", + "errorLabel":"", + "tooltip":"", + "hideLabel":false, + "tabindex":"", + "disabled":false, + "autofocus":false, + "dbIndex":false, + "customDefaultValue":"", + "calculateValue":"", + "calculateServer":false, + "widget":null, + "attributes":{ + }, + "validateOn":"change", + "validate":{ + "required":false, + "custom":"", + "customPrivate":false, + "strictDateValidation":false, + "multiple":false, + "unique":false, + "onlyAvailableItems":false + }, + "conditional":{ + "show":null, + "when":null, + "eq":"" + }, + "overlay":{ + "style":"", + "left":"", + "top":"", + "width":"", + "height":"" + }, + "allowCalculateOverride":false, + "encrypted":false, + "showCharCount":false, + "showWordCount":false, + "properties":{ + }, + "allowMultipleMasks":false, + "addons":[], + "dataSrc":"values", + "authenticate":false, + "ignoreCache":false, + "template":"{{ item.label }}", + "idPath":"id", + "clearOnRefresh":false, + "limit":100, + "valueProperty":"", + "lazyLoad":true, + "filter":"", + "searchEnabled":true, + "searchDebounce":0.3, + "searchField":"", + "minSearch":0, + "readOnlyValue":false, + "selectFields":"", + "selectThreshold":0.3, + "uniqueOptions":false, + "fuseOptions":{ + "include":"score", + "threshold":0.3 + }, + "indexeddb":{ + "filter":{} + }, + "customOptions":{ + }, + "useExactSearch":false + } + ], + "width":6, + "offset":0, + "push":0, + "pull":0, + "size":"md", + "currentWidth":6 + }, + { + "components":[ + { + "label":"Radio", + "values":[ + { + "label":"yes", + "value":"yes", + "shortcut":"" + }, + { + "label":"no", + "value":"no", + "shortcut":"" + } + ], + "key":"placeholder_key6", + "type":"simpleradioadvanced", + "id":"ewc47ib", + "input":true, + "placeholder":"", + "prefix":"", + "customClass":"", + "suffix":"", + "multiple":false, + "defaultValue":null, + "protected":false, + "unique":false, + "persistent":true, + "hidden":false, + "clearOnHide":true, + "refreshOn":"", + "redrawOn":"", + "tableView":false, + "modalEdit":false, + "dataGridLabel":false, + "labelPosition":"top", + "description":"", + "errorLabel":"", + "tooltip":"", + "hideLabel":false, + "tabindex":"", + "disabled":false, + "autofocus":false, + "dbIndex":false, + "customDefaultValue":"", + "calculateValue":"", + "calculateServer":false, + "widget":null, + "attributes":{ + }, + "validateOn":"change", + "validate":{ + "required":false, + "custom":"", + "customPrivate":false, + "strictDateValidation":false, + "multiple":false, + "unique":false, + "onlyAvailableItems":false + }, + "conditional":{ + "show":null, + "when":null, + "eq":"" + }, + "overlay":{ + "style":"", + "left":"", + "top":"", + "width":"", + "height":"" + }, + "allowCalculateOverride":false, + "encrypted":false, + "showCharCount":false, + "showWordCount":false, + "properties":{ + }, + "allowMultipleMasks":false, + "addons":[], + "dataSrc":"values", + "authenticate":false, + "ignoreCache":false, + "template":"{{ item.label }}", + "inputType":"radio", + "data":{ + "url":"" + }, + "fieldSet":false + } + ], + "width":6, + "offset":0, + "push":0, + "pull":0, + "size":"md", + "currentWidth":6 + } + ], + "input":false, + "placeholder":"", + "prefix":"", + "customClass":"", + "suffix":"", + "multiple":false, + "defaultValue":null, + "protected":false, + "unique":false, + "persistent":false, + "hidden":false, + "clearOnHide":false, + "refreshOn":"", + "redrawOn":"", + "tableView":false, + "modalEdit":false, + "dataGridLabel":false, + "labelPosition":"top", + "description":"", + "errorLabel":"", + "tooltip":"", + "hideLabel":false, + "tabindex":"", + "disabled":false, + "autofocus":false, + "dbIndex":false, + "customDefaultValue":"", + "calculateValue":"", + "calculateServer":false, + "widget":null, + "attributes":{ + }, + "validateOn":"change", + "validate":{ + "required":false, + "custom":"", + "customPrivate":false, + "strictDateValidation":false, + "multiple":false, + "unique":false + }, + "conditional":{ + "show":null, + "when":null, + "eq":"" + }, + "overlay":{ + "style":"", + "left":"", + "top":"", + "width":"", + "height":"" + }, + "allowCalculateOverride":false, + "encrypted":false, + "showCharCount":false, + "showWordCount":false, + "properties":{ + }, + "allowMultipleMasks":false, + "addons":[], + "tree":false, + "lazyLoad":false, + "autoAdjust":false + } + ] + } + ], + "input":false, + "placeholder":"", + "prefix":"", + "customClass":"", + "suffix":"", + "multiple":false, + "defaultValue":null, + "protected":false, + "unique":false, + "persistent":false, + "hidden":false, + "clearOnHide":true, + "refreshOn":"", + "redrawOn":"", + "tableView":false, + "modalEdit":false, + "dataGridLabel":false, + "labelPosition":"top", + "description":"", + "errorLabel":"", + "tooltip":"", + "hideLabel":false, + "tabindex":"", + "disabled":false, + "autofocus":false, + "dbIndex":false, + "customDefaultValue":"", + "calculateValue":"", + "calculateServer":false, + "widget":null, + "attributes":{ + }, + "validateOn":"change", + "validate":{ + "required":false, + "custom":"", + "customPrivate":false, + "strictDateValidation":false, + "multiple":false, + "unique":false + }, + "conditional":{ + "show":null, + "when":null, + "eq":"" + }, + "overlay":{ + "style":"", + "left":"", + "top":"", + "width":"", + "height":"" + }, + "allowCalculateOverride":false, + "encrypted":false, + "showCharCount":false, + "showWordCount":false, + "properties":{ + }, + "allowMultipleMasks":false, + "addons":[], + "tree":false, + "lazyLoad":false, + "verticalLayout":false + }, + { + "type":"simplecheckboxadvanced", + "label":"Checkbox", + "key":"placeholder_key11", + "id":"eh6cmxn", + "input":true, + "placeholder":"", + "prefix":"", + "customClass":"", + "suffix":"", + "multiple":false, + "defaultValue":null, + "protected":false, + "unique":false, + "persistent":true, + "hidden":false, + "clearOnHide":true, + "refreshOn":"", + "redrawOn":"", + "tableView":false, + "modalEdit":false, + "dataGridLabel":true, + "labelPosition":"right", + "description":"", + "errorLabel":"", + "tooltip":"", + "hideLabel":false, + "tabindex":"", + "disabled":false, + "autofocus":false, + "dbIndex":false, + "customDefaultValue":"", + "calculateValue":"", + "calculateServer":false, + "widget":null, + "attributes":{ + }, + "validateOn":"change", + "validate":{ + "required":false, + "custom":"", + "customPrivate":false, + "strictDateValidation":false, + "multiple":false, + "unique":false + }, + "conditional":{ + "show":null, + "when":null, + "eq":"" + }, + "overlay":{ + "style":"", + "left":"", + "top":"", + "width":"", + "height":"" + }, + "allowCalculateOverride":false, + "encrypted":false, + "showCharCount":false, + "showWordCount":false, + "properties":{ + }, + "allowMultipleMasks":false, + "addons":[], + "inputType":"checkbox", + "value":"", + "name":"" + }, + { + "type":"button", + "id":"ek8pz1m", + "key":"placeholder_submit", + "label":"Submit", + "action":"submit", + "input":true, + "placeholder":"", + "prefix":"", + "customClass":"", + "suffix":"", + "multiple":false, + "defaultValue":null, + "protected":false, + "unique":false, + "persistent":false, + "hidden":false, + "clearOnHide":true, + "refreshOn":"", + "redrawOn":"", + "tableView":false, + "modalEdit":false, + "dataGridLabel":true, + "labelPosition":"top", + "description":"", + "errorLabel":"", + "tooltip":"", + "hideLabel":false, + "tabindex":"", + "disabled":false, + "autofocus":false, + "dbIndex":false, + "customDefaultValue":"", + "calculateValue":"", + "calculateServer":false, + "widget":{ + "type":"input" + }, + "attributes":{ + }, + "validateOn":"change", + "validate":{ + "required":false, + "custom":"", + "customPrivate":false, + "strictDateValidation":false, + "multiple":false, + "unique":false + }, + "conditional":{ + "show":null, + "when":null, + "eq":"" + }, + "overlay":{ + "style":"", + "left":"", + "top":"", + "width":"", + "height":"" + }, + "allowCalculateOverride":false, + "encrypted":false, + "showCharCount":false, + "showWordCount":false, + "properties":{ + }, + "allowMultipleMasks":false, + "addons":[], + "size":"md", + "leftIcon":"", + "rightIcon":"", + "block":false, + "disableOnInvalid":false, + "theme":"primary" + } + ] +} \ No newline at end of file diff --git a/docs/Capabilities/Functionalities/examples/minimum_schema_JSON_file.json b/docs/Capabilities/Functionalities/examples/minimum_schema_JSON_file.json new file mode 100644 index 0000000..0de8195 --- /dev/null +++ b/docs/Capabilities/Functionalities/examples/minimum_schema_JSON_file.json @@ -0,0 +1,112 @@ +{ + "display": "form", + "type": "form", + "components": [ + { + "html": "

Placeholder heading 1

", + "type": "simplecontent", + "label": "Text/Images" + }, + { + "label":"Tabs", + "type":"tabs", + "components":[ + { + "label":"basic fields Tab", + "components":[ + { + "label": "Text Field", + "type": "simpletextfieldadvanced" + }, + { + "label": "Text Area", + "type": "simpletextareaadvanced" + }, + { + "label": "Date / Time", + "type": "simpledatetimeadvanced" + } + ] + }, + { + "label":"layouts tab", + "components":[ + { + "type": "panel", + "title": "Validation Fields", + "components": [ + { + "label": "Email", + "type": "simpleemailadvanced" + }, + { + "label": "Phone Number", + "type": "simplephonenumberadvanced" + }, + { + "label": "Currency", + "type": "simplecurrencyadvanced" + } + ] + }, + { + "type": "columns", + "label":"Columns", + "columns": [ + { + "components": [ + { + "label": "Select", + "data": { + "values": [ + { + "label": "option 1", + "value": "option1" + }, + { + "label": "option 2", + "value": "option2" + } + ] + }, + "type": "simpleselectadvanced" + } + ] + }, + { + "components": [ + { + "label": "Radio", + "values": [ + { + "label": "yes", + "value": "yes", + "shortcut": "" + }, + { + "label": "no", + "value": "no", + "shortcut": "" + } + ], + "type": "simpleradioadvanced" + } + ] + } + ] + } + ] + } + ] + }, + { + "label": "Checkbox", + "type": "simplecheckboxadvanced" + }, + { + "type": "button", + "label": "Submit", + "action": "submit" + } + ] +} From 0a9d075f50fa63212ce6e5d29c449c3684e72f98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cbhuvan-aot=E2=80=9D?= <“bhuvanesh.p@aot-technologies.com”> Date: Fri, 15 Mar 2024 15:50:47 -0700 Subject: [PATCH 2/5] Added documentation to create a form using JSON with minimum fields. --- .../Functionalities/Importing-and-exporting-form-designs.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/Capabilities/Functionalities/Importing-and-exporting-form-designs.md b/docs/Capabilities/Functionalities/Importing-and-exporting-form-designs.md index d977dbb..b1f2219 100644 --- a/docs/Capabilities/Functionalities/Importing-and-exporting-form-designs.md +++ b/docs/Capabilities/Functionalities/Importing-and-exporting-form-designs.md @@ -43,5 +43,6 @@ If for any reason if you would like to create the forms using the JSON Schema in |---|---|---| |[Basic components with Layouts](https://submit.digital.gov.bc.ca/app/form/submit?f=0da54bf6-2951-4579-8426-76565137f395)|[Minimum Schema JSON file](examples/minimum_schema_JSON_file.json)|[Full Schema JSON file](examples/full_schema_JSON_file.json)| +Once the desired JSON file is ready follow above metioned [guidelines](#import-a-form-design) to import it into the form designer. *** [Terms of Use](Terms-of-Use) | [Privacy](Privacy) | [Security](Security) | [Service Agreement](Service-Agreement) | [Accessibility](Accessibility) \ No newline at end of file From 3e0ca2ca2e02a4ed0d123bf59fb14c01788a1f9d Mon Sep 17 00:00:00 2001 From: bhuvan-aot <61068301+bhuvan-aot@users.noreply.github.com> Date: Mon, 18 Mar 2024 14:14:31 -0700 Subject: [PATCH 3/5] Apply suggestions from code review Co-authored-by: Walter Moar --- .../Functionalities/Importing-and-exporting-form-designs.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/Capabilities/Functionalities/Importing-and-exporting-form-designs.md b/docs/Capabilities/Functionalities/Importing-and-exporting-form-designs.md index b1f2219..d8388f9 100644 --- a/docs/Capabilities/Functionalities/Importing-and-exporting-form-designs.md +++ b/docs/Capabilities/Functionalities/Importing-and-exporting-form-designs.md @@ -35,14 +35,14 @@ Exporting forms is a great way to copy an existing design or share it with other ## Creating a form using JSON with minimum fields. -CHEFS Form.io platform provides a visual form builder that lets you drag and drop form elements, and automatically generates the corresponding JSON schema for you. Every component and layouts in CHEFS are represented as JSON in the background. +CHEFS Form.io platform provides a visual form builder that lets you drag and drop form elements, and automatically generates the corresponding JSON schema for you. Every component and layout in CHEFS is represented as JSON in the background. -If for any reason if you would like to create the forms using the JSON Schema instead of visual form builder, below are some JSON schemas for some components with minimum mandatory variables and full schema. +If for any reason you would like to create the forms using the JSON Schema instead of the visual form builder, below are some JSON schemas for some components with minimum mandatory variables and full schema. |Form |Minimum Schema|Full schema| |---|---|---| |[Basic components with Layouts](https://submit.digital.gov.bc.ca/app/form/submit?f=0da54bf6-2951-4579-8426-76565137f395)|[Minimum Schema JSON file](examples/minimum_schema_JSON_file.json)|[Full Schema JSON file](examples/full_schema_JSON_file.json)| -Once the desired JSON file is ready follow above metioned [guidelines](#import-a-form-design) to import it into the form designer. +Once the desired JSON file is ready follow above mentioned [guidelines](#import-a-form-design) to import it into the form designer. *** [Terms of Use](Terms-of-Use) | [Privacy](Privacy) | [Security](Security) | [Service Agreement](Service-Agreement) | [Accessibility](Accessibility) \ No newline at end of file From c538443d5cdf94f7f6a94a7cafbd7bfe921fc8b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cbhuvan-aot=E2=80=9D?= <“bhuvanesh.p@aot-technologies.com”> Date: Thu, 21 Mar 2024 13:02:25 -0700 Subject: [PATCH 4/5] renaming json files to match the naming convention. --- ..._file.json => chefs_example__full_schema_template_upload.json} | 0 ...le.json => chefs_example__minimum_schema_template_upload.json} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename docs/Capabilities/Functionalities/examples/{full_schema_JSON_file.json => chefs_example__full_schema_template_upload.json} (100%) rename docs/Capabilities/Functionalities/examples/{minimum_schema_JSON_file.json => chefs_example__minimum_schema_template_upload.json} (100%) diff --git a/docs/Capabilities/Functionalities/examples/full_schema_JSON_file.json b/docs/Capabilities/Functionalities/examples/chefs_example__full_schema_template_upload.json similarity index 100% rename from docs/Capabilities/Functionalities/examples/full_schema_JSON_file.json rename to docs/Capabilities/Functionalities/examples/chefs_example__full_schema_template_upload.json diff --git a/docs/Capabilities/Functionalities/examples/minimum_schema_JSON_file.json b/docs/Capabilities/Functionalities/examples/chefs_example__minimum_schema_template_upload.json similarity index 100% rename from docs/Capabilities/Functionalities/examples/minimum_schema_JSON_file.json rename to docs/Capabilities/Functionalities/examples/chefs_example__minimum_schema_template_upload.json From ee9fdd0d381c910f8a2606f2212c40c7e281bcaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cbhuvan-aot=E2=80=9D?= <“bhuvanesh.p@aot-technologies.com”> Date: Thu, 21 Mar 2024 13:15:08 -0700 Subject: [PATCH 5/5] update md file with new file names. --- .../Functionalities/Importing-and-exporting-form-designs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Capabilities/Functionalities/Importing-and-exporting-form-designs.md b/docs/Capabilities/Functionalities/Importing-and-exporting-form-designs.md index d8388f9..2efb229 100644 --- a/docs/Capabilities/Functionalities/Importing-and-exporting-form-designs.md +++ b/docs/Capabilities/Functionalities/Importing-and-exporting-form-designs.md @@ -41,7 +41,7 @@ If for any reason you would like to create the forms using the JSON Schema inste |Form |Minimum Schema|Full schema| |---|---|---| -|[Basic components with Layouts](https://submit.digital.gov.bc.ca/app/form/submit?f=0da54bf6-2951-4579-8426-76565137f395)|[Minimum Schema JSON file](examples/minimum_schema_JSON_file.json)|[Full Schema JSON file](examples/full_schema_JSON_file.json)| +|[Basic components with Layouts](https://submit.digital.gov.bc.ca/app/form/submit?f=0da54bf6-2951-4579-8426-76565137f395)|[Minimum Schema JSON file](examples/chefs_example__minimum_schema_template_upload.json)|[Full Schema JSON file](examples/chefs_example__full_schema_template_upload.json)| Once the desired JSON file is ready follow above mentioned [guidelines](#import-a-form-design) to import it into the form designer. ***