This page lists all the React json-schema components that can be used to create Forms and their compatibility within the PEP Health solution.
...
Component | Description/Notes | Compatible? | Rendering Information | ||||||
---|---|---|---|---|---|---|---|---|---|
Github:
| |||||||||
Schema | |||||||||
“default“:”value” | Set a default value to a question |
| |||||||
“required“:[] | Force user to give an answer to a question |
| |||||||
“type“:”integer” | Should accept integer value only |
| |||||||
"minLength": 3 | Set a minimum length of character to an answer to a question |
| |||||||
uiSchema | |||||||||
"ui:autofocus": true | Upon opening of the form the cursor should be on the answer field automatically |
| |||||||
"ui:placeholder":”hint text on the field” | a background text on the field |
| |||||||
"ui:emptyValue": "" | should accept empty answer even if the question is required |
| |||||||
"ui:autocomplete":”variable-name” | Would provide a list of answer if you have entered a similar answer before to other forms |
| |||||||
"ui:widget":"updown" | Provide an up-down button if the required answer is a number or integer |
| |||||||
"ui:title": "Age of person" | Override the “title“ provided in the Schema |
| |||||||
"ui:description": "(earth year)" | override or set a description under the “question” |
| |||||||
"ui:widget": "password" | the answer is hidden by converting each character as a bullet or asterisk |
| |||||||
"ui:widget": "textarea" | provide a bigger text field
|
| |||||||
Github:
| |||||||||
Schema | |||||||||
"type": "string", | Answer should be in email format |
| |||||||
"type": "string", | Answer should be in url format |
| |||||||
"type": "boolean" |
| ||||||||
| makes the answer field read-only, default answer can be selected |
| |||||||
"enum": [ | Select options (dropdown by default) |
| |||||||
"enum": [ | Select options (dropdown by default) with custom displayed title for each option but the resulting value is the “enum” |
| |||||||
"oneOf": [ | Select options (dropdown by default) with custom displayed title for each option but the resulting value is the “const” Similar to “enum“ + “enumNames“ |
| |||||||
uiSchema | |||||||||
"ui:widget": "radio" | Schema
the description is rendered twice. |
| |||||||
"ui:widget": "select" |
| ||||||||
"ui:widget": "textarea", |
| ||||||||
"ui:placeholder": "This is a placeholder" |
| ||||||||
"ui:widget": "color" |
| ||||||||
"ui:widget": "hidden" | the question should not be shown in the form |
| |||||||
"ui:disabled": true | makes the answer field disabled and default answer cannot be selected or highlighted |
| |||||||
"ui:readonly": true | the answer field can be selected and highlighted for copying, but it cannot be edited. |
| |||||||
"ui:options": {"backgroundColor": "yellow"} | the answer field should have a background color, in this case, yellow |
| |||||||
Github:
| |||||||||
Schema | |||||||||
Definition:
Schema:
| recursive referencing incorrect rendering of buttons, too small to notice. |
| |||||||
uiSchema | |||||||||
"ui:order": [ | re-arrange sequence using ui:order |
| |||||||
Github:
| |||||||||
Schema | |||||||||
|
| ||||||||
|
| ||||||||
|
| ||||||||
uiSchema | |||||||||
| alt-datetime placeholder for each field is not rendered |
| |||||||
| alt-date placeholder for each field is not rendered |
| |||||||
Github:
| |||||||||
Schema | |||||||||
| additional follow-up questions not rendered, or questions that will appear depending on the answer on the previous question |
|
...