Skip to content
Other versions

Loading…

Metadata Option element

The option element is only used in combination with Metadata Select field. The option value represents a list of distinct values to select.

Attribute Description Required
label The text shown as the label in the user interface. true
value Unique value identifier.
Two options cannot have the same value. Value must be unique.
It is recommended to use only characters that match this regular expression: [a-z_] (a to z in lowercase and underscore, no spaces)
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.
More information about creating your own styles can be found at CSS.
false
  • Parent:
  • 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 property-groups PUBLIC "-//OpenKM//DTD Property Groups 3.10//EN"
"http://www.openkm.com/dtd/property-groups-3.10.dtd">
<property-groups>
<property-group label="Consulting" name="okg:consulting">
<select label="select label" name="okp:consulting.select" type="simple">
<option label="one" value="001" />
<option label="two" value="002" selected="true"/>
<option label="three" value="003" />
</select>
</property-group>
</property-groups>
  • The field option value of “okp:consulting.children” has a parent relationship with “okp:consulting.parent”. It is defined by parentElement=“okp:consulting.parent”.
  • The option value “benefits” of the field “okp:consulting.children” has a parent value “directives” from field “okp:consulting.parent”.

Tree relationships:

  • directives
    • benefits
    • eligibility
    • services
  • handbook
    • basic
    • normal
    • advanced
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE property-groups PUBLIC "-//OpenKM//DTD Property Groups 3.10//EN"
"http://www.openkm.com/dtd/property-groups-3.10.dtd">
<property-groups>
<property-group label="Consulting" name="okg:consulting">
<select label="Provincia" name="okp:consulting.parent" type="simple">
<option value="directives" label="Directives" />
<option value="handbook" label="Handbook Paragraphs" />
</select>
<select label="Provincia" name="okp:consulting.children" type="simple" parentElement="okp:consulting.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>
</property-group>
</property-groups>