Skip to content

Sections

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

The form section is an aggregation of control items. Visually, the child form controls are then indented underneath the section header. It has the ability to add a section header, as well as an optional description. You are able to nest objects.

A display property is available to this schema object. Currently, only a tabs display is supported. To display sections as tabs, display: tabs is available for use, and it will result in all sections being placed as part of a tabstrip at the bottom of the page. To further specify which sections to display in a tabstrip, a tabs property is also available.

*= required property

Property Value Use Example
*type "object" Indicates that the schema object should be rendered as an object containing form children. "type": "object"
display "sections" OR "tabs" The display. Default is as sections, but display: sections can be explicitly defined. tabs is available as a value to instead display sections as tabs in a tabstrip, which will always appear at the bottom of its section. Alone, a display of tabs will result in all sections being placed as tabs in a tabstrip. "display": "tabs"
tabs String[] This array enables the user to specify which sections to display as tabs. This array contains the keys of those objects that should display as tabs. If a display of tabs is not present, it will be ignored. Only "type": "object"s will be displayed as tabs. "tabs": ["objectOneKey", "objectTwoKey"]
*name String The corresponding label for the form element. This will display as the section header "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."
description String This will display as the description underneath the section header "description": "This is a description for my section."
*properties Object Contains all of the json information to create child forms. See example below
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"]
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 all of its children from view of the user. However, this can still be programmatically set. "isHidden": true

Example

"loginInfo": {
    "type": "object",
    "name": "Login Information",
    "description": "Enter credentials to connect",
    "required": ["childControl1", "childControl2"],
	"display": "tabs",
	"tabs": ["childObject2"],
    "properties": {
        "childControl1": {...},
        "childControl2": {...},
		"childObject1": {
			"type": "object",
			"properties": {...}
		}
		"childObject2": {
			"type": "object",
			"properties": {...}
		}
    }
}

2.0.0

  • Enhancement: Added the ability to make a control readonly
  • Enhancement: Added the ability to hide a form control
  • Enhancement: Added the ability to display sections as tabs
  • Enhancement: Added the basic section functionality
Clone this wiki locally