Skip to content

Metadata Input field

In most cases, this field is used to enter free-form text, although it can save HTTP links, dates, and data or refer to the application folder (as an internal link to this folder).

Attribute Description Required
label The text is shown as a label in the user interface. true
name Unique field identifier.
Two metadata items can’t have the same name. The name must be unique.
The name must start with “okp:”.
Using the metadata group name as the basis for the metadata field name is a good practice. For example, using “okg:consulting” for the group name results in the field name “okp:consulting.input” by 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
type Type of value. Allowed types:
- text.
- date.
- link.
- folder.
No
value Specifies a default value for this component.
There is a special case for date types. Data are stored in the format “yyyyMMddHHmmss”. Be aware of this format when using the OpenKM API.
false
width The width of the HTML element.
In the case of KCenter, the UI must use width values based on percentages, for example:
- width=“50%” will work
- width=“100px” will be ignored in the KCenter UI.
false
height The height of the HTML element.
Note: This attribute is inherited from FormElement but has no visual effect for this field type.
false
placeholder The placeholder value.
description General description. false
readonly If the field cannot be modified from user interface. By default, the value is “false”. false
timeFormat When the input type is “date”, we can specify whether we want to be able to see and modify hours and minutes. Allowed values:
- hm
- h
- none
false
searchType Choose how Lucene analyzes the string value. These are the possible values:
- fuzzy
- exact
The default value is “fuzzy”. When the value is “fuzzy”, Lucene analyzes and/or tokenizes the string. If the value is set to “exact”, Lucene will not tokenize the string, making the search more exact. For example, if you have two nodes with these property values:
- Node 1: “1000”
- Node 2: “100”
In the case of “fuzzy”, if you look for “100” both results will appear. In the case of “exact”, only Node 2 will appear in the results.
dbColumnSize Set the size of the database field where the value is stored.
By default, fields are stored in a database column with a size of 128 characters. Because your data length might be greater than 128 characters, the administrator should update the default column size.
Take a look at the Metadata XML definition documentation section for a detailed explanation of metadata stored 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">
<input label="Input label" name="okp:consulting.input" />
</property-group>
</property-groups>