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 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 redered.  | 
false | 
| 
 cssClass  | 
 CSS class. More information about creating your own styles at CSS.  | 
 false  | 
| 
 Parent: 
  | 
||
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 property-groups PUBLIC "-//OpenKM//DTD Property Groups 2.5//EN"
                                 "http://www.openkm.com/dtd/property-groups-2.5.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>
Hierarchical relationship
- The field option value of "okp:consulting.children" have a parent relation with "okp:consulting.parent". It's 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
 - elegibility
 - services
 
 - handbook
- basic
 - normal
 - advanced
 
 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE property-groups PUBLIC "-//OpenKM//DTD Property Groups 2.5//EN"
                                 "http://www.openkm.com/dtd/property-groups-2.5.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>