Skip to content

Checkboxes with Children

Erin Heinz edited this page Mar 16, 2020 · 1 revision

The hierarchical control extends the section control. This will display a checkbox with a label. When the checkbox is checked, it will display child items underneath it in a hierarchical structure. When the input is unchecked, the children are re-hidden. Note: The children form objects can be any form control type.

Property Value Use Example
*type "object" Indicates that the schema object should be rendered as an object containing form children. "type": "object"
*name String The corresponding label for the form element "name": "Form Display Name"
helpText String Will display as an information icon next to the form element. The provided string will display when the user hovers over the icon. "helpText": "This is help text that can be very long."
tooltip String The tooltip that will display when hovering over the form element `"tooltip": "Tool tip for the form element."
*isConditional Boolean When this property is set to true, this indicates that the object should be displayed as a checkbox with children. If it is false, it will display it as a normal section. "isConditional": true
required String[] This property is added to the object to indicate which children are required. It is an array of keys associated with a child control. These keys can only be keys that exist in this section’s properties object. This array cannot reference nested keys. "required": ["key1", "key2"]
default boolean Indicates whether the checkbox with children should initially be checked or not "default": true
isReadOnly boolean This property indicates that the input control cannot be changed by the user. Any data within a readonly field will not be returned upon form submission. "isReadOnly": true
isHidden boolean This flag will hide the element and any children from view of the user. However, this can still be programmatically set. "isHidden": true
* = required property

Example Schema

"loginInfo": {
    "type": "object",
    "isConditional": true
    "name": "Login Information",
    "properties": [
        "emailUsername": {...},
        "email": {...},
        "password": {...}
    ]
}

Return Value when Parent Checkbox is Unchecked

"loginInfo": {
    "value": false
}

Return Value when Parent Checkbox is Checked

"loginInfo": {
    "value": true
    "emailUsername": false,
    "email": "test@cleo.com",
    "password": "Password123"
}

2.0.0

  • Enhancement: Added the ability to make a control readonly
  • Enhancement: Added the ability to hide a form control
  • Enhancement: Added the basic checkbox with children functionality
Clone this wiki locally