Changes

Jump to: navigation, search

Addon:Forms Gramplet

769 bytes added, 02:30, 7 May 2020
Writing your own form definitions: More detail of what the attributes mean and where they will turn up.
The <code>forms</code> element contains a number of <code>form</code> elements, each representing a form definition. The form start-tag contains 4 attributes:
* <code>id</code> : A unique code to identify the form definition. You will use this code in the "Form" attribute of the source.* <code>type</code>: The type of the event created by the form editor. This is value will appear in the XML representation "<code>Type</code>" column of an events ("EventType"). It would be wise to avoid standard ones, for example, to add death information you could specify "Death.Info" or another one you make up (I have been told that data loss is possible otherwise).* <code>title</code> : A description of the form. As far as I know, anything goes here and I haven't seen it used anywhere.* <code>date</code> : An optional date in a Gramps date format. This is only useful for census definitionsor similar events that happen on a specific date.
<form id='UK1841' type='Census' title='1841 UK Census' date='6 Jun 1841'>
The form is divided into sections which describe the information that needs to be captured for people performing a given role in the event. Each form element should contain at least one section element. The <code>section</code> start-tag contains can specify these 3 optional attributes(although none is required if all your fields are "heading"):
* <code>role</code> : The role that people in this section perform in the event. This is value will appear in the XML representation "<code>Role</code>" column of an events ("EventRoleType").
* <code>type</code> : The type of section. This defines how a section is displayed and people are selected. Allowed values are: '<code>person</code>' for a single person, '<code>multi</code>' for one or more people, or '<code>family</code>' for two people selected by a family.
* <code>title</code> : An optional title which will be used to describe the section.
A column element contains:
* An <code>_attribute</code> element. This contains the key used to store column information in the attributes of event reference objects within the Gramps database(The "Type" Attribute of the reference information for the event. If you use "<code>Name</code>" then the selected person's name will be prefilled. Once defined this text must not be changed.* An optional <code>_longname</code> element. This contains a fuller description of the column that and is only used in for tooltips (when you hover the mouse over the tooltips field in the editorform).* A <code>size</code> element. This contains the size of the column in the census report. It is a percentage of the page width. The sum of all size elements in a definition should total 100%. I'm unsure whether this works (it didn't for me).
<column>
14
edits

Navigation menu