Skip to content

Params form fields

Params forms are based on a formal XML definition. The DTD (Document Type Definition) defines the structure and the legal elements and attributes of an XML document.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE report-parameters PUBLIC "-//OpenKM//DTD Report Parameters 2.1//EN"
"http://www.openkm.com/dtd/report-parameters-2.1.dtd">
<report-parameters>
</report-parameters>
  • The DOCTYPE is a formal definition of a DTD. In the previous example, the DOCTYPE is report-parameters-2.1.dtd.
  • The XML begins with the tag and ends with . Within this hierarchy the metadata groups are defined.

Available field types:

  • Checkbox
  • Input
  • Select
  • Separator
  • Suggestbox
  • Text
  • TextArea

More information about field type elements is at Params fields

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE report-parameters PUBLIC "-//OpenKM//DTD Report Parameters 2.1//EN"
"http://www.openkm.com/dtd/report-parameters-2.1.dtd">
<report-parameters>
<input label="From" name="from_date" type="date">
<validator type="req"/>
</input>
<input label="To" name="to_date" type="date">
<validator type="req"/>
</input>
</report-parameters>

If the server has no access to the Internet, then the DTD file must be accessible in some way; for example, you can store a copy on your application server.

<!DOCTYPE property-groups PUBLIC "-//OpenKM//DTD Property Groups 2.1//EN"
"file:///home/openkm/report-parameters-2.1.dtd">
  • In the example, /home/openkm/report-parameters-2.1.dtd is the file system path to the file.