Skip to content

Metadata Checkbox field

Best used to represent boolean data:

Attribute Description Required
label The text is shown as a label in the user interface. true
name A unique field identifier.
Two metadata fields can’t have the same name and must be unique.
The name must start with “okp:”.
Using a metadata group name as a basis for a metadata field name is a good practice. For example, use “okg:consulting” as the group name and “okp:consulting.checkbox” as the field name, changing “okg” to “okp”. That helps to find the metadata group based on the metadata field name.
Please use only letters, numbers, and underscores: “0-9a-zA-Z_”.
true
value Specifies a default value for this component.
The allowed values are true and false.
false
width The width of the HTML element.
In the case of KCenter, the UI must use width values based on %, for example:
- width=“50%” will work
- width=“100px” will be ignored in the KCenter UI.
false
height Height of the field widget. Accepts CSS size values (e.g. 25px). Default: 25px.
Note: This attribute is inherited from FormElement but has no visual effect for this field type.
false
description General description. false
readonly The field cannot be modified in the user interface. By default, the value is “false”. false
dbColumnSize Set the size of the database field where the value is stored.
By default, checkbox fields are stored in a database column with a size of 8 characters (enough to store “true” or “false”). If needed, the administrator can update the default column size.
Take a look at the Metadata XML definition documentation section for a detailed explanation of metadata storage in the OpenKM database.
defaultAccess Default security access policy. By default, it is set to “grant”, so all users will see the property.
  • Child elements:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE property-groups PUBLIC "-//OpenKM//DTD Property Groups 3.15//EN"
"http://www.openkm.com/dtd/property-groups-3.15.dtd">
<property-groups>
<property-group label="Consulting" name="okg:consulting">
<checkbox label="Checkbox label" name="okp:consulting.checkbox" />
</property-group>
</property-groups>