Page 1 of 1

repeated fields in templates

PostPosted:Mon Nov 05, 2012 1:57 pm
by rasha123
hi ,

im using openkm 5.1.10 and open office 3.2.1

i have created PDF templete in openoffice and assign it to a properety group.

i want to make reapeated fields with the form , for example i want to write the ame once and it will be filed in other places atumaticly in the form.
Untitled.png
Untitled.png (16.17 KiB) Viewed 3050 times
this is PROPERTY GROUP.CND
Code: Select all
[okg:PatientLable] mixin
- okp:PatientLable.name (string) = '' autocreated
- okp:PatientLable.number (string) = '' autocreated
- okp:PatientLable.bed (string) = '' autocreated
- okp:PatientLable.birth (string) = '' autocreated
- okp:PatientLable.admission (string) = '' autocreated
PROPERTY GROUP.XML
Code: Select all
<property-group label="Patient Labele" name="okg:PatientLable">
    <input label="Patient Name" name="okp:PatientLable.name"/>
    <input label="Hospital No" name="okp:PatientLable.number"/>
    <input label="Unit/Bed" name="okp:PatientLable.bed"/>
    <input label="Birth Date" name="okp:PatientLable.birth" type="date"/>
    <input label="Admission" name="okp:PatientLable.admission" type="date"/>
  </property-group>
thankss :)

Re: repeated fields in templates

PostPosted:Tue Nov 06, 2012 9:26 pm
by jllort
Simply in your pdf your fiels should be like:
property group name -> okp:tpl.name
field name -> okp_tpl_name
field_value -> ${okp_tpl_name!}

Re: repeated fields in templates

PostPosted:Wed Nov 07, 2012 6:00 am
by rasha123
hi

thats what i did but in all the fields i wanted the name to be repeated in but it only appeare in the first one.
Untitled1.png
Untitled1.png (11.41 KiB) Viewed 3042 times
the rest are empty

what im missing ?

Re: repeated fields in templates

PostPosted:Fri Nov 09, 2012 11:03 am
by pavila
In PDF templates the name of the field need to be unique. If you want to repeat the same property value, try OpenOffice templates. See http://wiki.openkm.com/index.php/Creating_templates.

Edit: I have included a patch in OpenKM 6.2 Community and now you can set several form fields using a template expression.

Re: repeated fields in templates

PostPosted:Sat Nov 10, 2012 7:43 am
by rasha123
Thanks working fine now with openoffice :)