• Property Groups - unable to use "value" attribute in Input

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #13828  by fcamisa
 
Hi,

I when I try to specify e predefined value an an Input Form Element a get the following error:
Code: Select all
Class: 	com.openkm.core.ParseException
Message: 	Attribute "value" must be declared for element type "input"
I am using openKM Version: 5.1.9 (build: 7447).

This is the PropertyGroups.xml I am trying to use:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE property-groups PUBLIC "-//OpenKM//DTD Property Groups 2.0//EN"
                                 "http://www.openkm.com/dtd/property-groups-2.0.dtd">
<property-groups>
  <property-group label="Regione" name="okg:regione">
    <input label="Regione" type="text" name="okp:regione.nregione" value="veneto" />
    <select label="Tipo documento" name="okp:regione.tipo" type="simple">
      <option label="Circolare" value="Circolare"/>
	  <option label="DGR" value="DGR"/>
      <option label="Legge" value="Legge"/>
      <option label="Lettera" value="Lettera"/>
	  <option label="Nota" value="Nota"/>
	</select>
    <input label="Organo" type="text" name="okp:regione.organo" />
	<input label="Autore" type="text" name="okp:regione.autore" />
	<input label="Protocollo" type="text" name="okp:regione.protocollo"/>
	<input label="Data" type="date" name="okp:regione.data" />
	<textarea label="Oggetto" name="okp:regione.oggetto"/>
  </property-group>
</property-groups>
Thanks in advance for any help.

Francesco
 #13836  by okmuser
 
I think you must declare value attributes to these inputs:
Code: Select all
<input label="Organo" type="text" name="okp:regione.organo" [b]value="organo"[/b]/>
<input label="Autore" type="text" name="okp:regione.autore" [b]value="autore"[/b]/>
<input label="Protocollo" type="text" name="okp:regione.protocollo" [b]value="protocollo"[/b]/>
<input label="Data" type="date" name="okp:regione.data" [b]value="data"[/b]/>
 #13873  by pavila
 
To specify a default value you can use something like this:
Code: Select all
<okm = 'http://www.openkm.org/1.0'>
<okg = 'http://www.openkm.org/group/1.0'>
<okp = 'http://www.openkm.org/group/property/1.0'>

[okg:consulting] mixin
- okp:consulting.name (string) = 'default value' autocreated
- okp:consulting.comment (string) = 'other default' autocreated

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.