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 select.
| Attribute | Description | Required |
|---|---|---|
| label | The text shown as label in the user interface. | true |
| value | Unique value identifier. Two options can’t have the same value. Value must be unique. |
true |
| parentValue | When present, it specifies the option parent. The parent must be present in other select. |
false |
| selected | When present, it specifies that an option should be pre-selected when the form is rendered. | false |
| cssClass | CSS class. More information about creating your own styles at: CSS. |
false |
- Parent:
Basic select with selected option
Section titled “Basic select with selected option”- attribute selected=true, when present, it specifies that an option should be pre-selected when the page loads.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE workflow-forms PUBLIC "-//OpenKM//DTD Workflow Forms 2.6//EN" "http://www.openkm.com/dtd/workflow-forms-2.6.dtd"><workflow-forms> <workflow-form task="textarea test"> <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></workflow-forms>Hierarchical relationship
Section titled “Hierarchical relationship”- The field option value of “children” have a parent relation with “parent”. It’s defined by parentElement=“parent”.
- The option value “benefits” of the field “children” has a parent value “directives” from field “parent”.
Tree relationships:
- directives
- benefits
- eligibility
- services
- handbook
- basic
- normal
- advanced
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE workflow-forms PUBLIC "-//OpenKM//DTD Workflow Forms 2.6//EN" "http://www.openkm.com/dtd/workflow-forms-2.6.dtd"><workflow-forms> <workflow-form task="textarea test"> <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></workflow-forms>