Workflow Option element
The option element is only used in combination with Workflow Select field. The option value represents a list of distinct values to choose from.
| Attribute | Description | Required |
|---|---|---|
| label | The text shown as the label in the user interface. | true |
| value | A unique value identifier. Two options cannot have the same value. The value must be unique. |
true |
| parentValue | When present, it specifies the option’s parent. The parent must be present in another select. |
false |
| selected | When present, it specifies that an option should be pre-selected when the form is rendered. | false |
| cssClass | CSS class. For more information about creating your own styles, see: CSS. |
false |
Parent:
- Select. For more information, please see: Workflow Select field.
Basic select with selected option
Section titled “Basic select with selected option”- The attribute selected=“true”, when present, specifies that an option should be pre-selected when the page loads.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE workflow-form PUBLIC "-//OpenKM//DTD Workflow Form 1.0//EN" "https://www.openkm.com/dtd/workflow-form-1.0.dtd"><workflow-form> <select label="select label" name="test" type="simple"> <option label="one" value="001" /> <option label="two" value="002" selected="true"/> <option label="three" value="003" /> </select></workflow-form>Hierarchical relationships
Section titled “Hierarchical relationships”- The field option value of “children” has a parent relation with “parent”. It is defined by parentElement=“parent”.
- The option value “benefits” of the field “children” has a parent value “directives” in the field “parent”.
Tree relationships:
- directives
- benefits
- eligibility
- services
- handbook
- basic
- normal
- advanced
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE workflow-form PUBLIC "-//OpenKM//DTD Workflow Form 1.0//EN" "https://www.openkm.com/dtd/workflow-form-1.0.dtd"><workflow-form> <select label="Provincia" name="parent" type="simple"> <option value="directives" label="Directives" /> <option value="handbook" label="Handbook Paragraphs" /> </select> <select label="Provincia" name="children" type="simple" parentElement="parent"> <option value="benefits" label="Benefits" parentValue="directives" /> <option value="elegibility" label="Eligibility" parentValue="directives"/> <option value="services" label="Services" parentValue="directives"/> <option value="basic" label="Basic" parentValue="handbook" /> <option value="normal" label="Advanced" parentValue="handbook"/> <option value="advanced" label="Normal" parentValue="handbook"/> </select></workflow-form>