Creating a custom section is similar to creating any other kind of section, except that you need to indicate the kinds of fields to appear, and configure those fields. You can create custom fields within a custom, objective, or competency section.
The process to create custom fields is exactly the same in each type of section, but the visibility of those fields differs across different sections.
Watch this video to learn how custom fields display in each section of the performance form.
In a custom section, the fields appear as frequently as specified. In a competency or objective section, the custom fields repeat for each item in that section. You can see an example in the figure shown below.
Note
Remember that the custom fields appear in the order indicated by the index value in each <fm-element>
, starting with index="0"
.For each custom field, four elements must be defined:
Element Key – ID for the field. Must be one word, unique per form template, and can be used for permissioning.
Element Name – Label that appears on the form; some basic HTML functionality.
Element Type – Defines the kind of element and dictates the kind of data allowed. Indicated in element attributes as type="x". You can find all the available types in the table titled Custom Field Element Types.
Element Value <evalue> – Used to pre-populate a value in the field – can also be reportable.
There is more flexibility to create <evalue> in XML, because in Manage Templates you are restricted to the field type.
For example, if the field type is Integer, which only supports a whole number, you may only populate the <evalue> field with a whole number. In XML, you are able to use text to pre-populate the field instead than being restricted to a whole number.
Types of Custom Fields
Field | Definition |
---|
<ekey> | This is the id for the field, and is used for permissioning and other functions. The element key must be unique per form template, and can only be one word. |
<ename> | This is the label that appears on the form. Limited HTML tags may be used in this field, such as <b></b> for bold, etc. |
<type> | This defines what kind of element this field will be, and what type of data is allowed. It is indicated in the sub-element attributes as type="x," where x is the number indicating the type of element. |
<evalue> | This is used to pre-populate a value in the field. Only required if using the element type of checkbox. The value within this element is chosen to match the content of the checkbox (for example, True, Yes, or Approved). Allows the value to be reportable. If a value is not specified, then no value is stored in the database, and nothing shows up on reports. If an <evalue> is entered, and the user does not change that default value, the <evalue> is what will be reported.
|
Custom Field Element Types
Element Type (XML) | Element Type | Description |
---|
1 | Section | Do not use – not a valid fm-element type |
2 | Label | Label in bold text |
3 | Text | Single line text box |
4 | Textarea | Multi-line text box – Will be a rich text editor with legal scan and spell check if those features are enabled for the form. |
5 | Date | Date box |
6 | List | Drop-down list |
7 | Integer | Text box for a whole number only |
8 | Double | Text box for a number with decimals |
9 | Checkbox | Checkbox labeled item – Must specify the <evalue>, otherwise no data will be stored when checked. |
10 | Hidden | Hidden value – static value that will be included in an export. |
Note
Custom section elements of type Text, Textarea, and Checkbox can be made editable during form launch.Text Example: Manage Templates Text Custom Fields
Text Example: XML Custom Field
Textarea Example: Manage Templates Custom Field
Textarea Example: XML Custom Field
Date Example: Manage Templates Custom Field
Date Example: XML Custom Field
List Example (elist): Manage Templates Custom Field
List Example (elist): XML Custom Field
Integer Custom Field
The Integer field supports numerical values, so in Manage Templates, you can only type a number in the Value field.
In XML, you can type text into the Value (evalue in XML) field that pre-populates the field with text that is visible to the end user.
Integer Example: XML Custom Field
In XML, type text into the Value (evalue in XML) field that pre-populates the field with text that is visible to the end user.
Double Custom Field
The Double field supports numerical values, so in Manage Templates, you can only type a number in the Value field.
Double Example: XML Custom Field
Checkbox Custom Field
Checkbox Example: XML Custom Field
Custom element types are noted in the figure shown below. Match the numbers in the figure with the items in the list below:
Label
Double
Integer
Date
Checkbox
Elist
Text
Textarea
Custom Element Error
Custom Element Error Explanation
Introduction Text for Custom Sections
It is possible to add an introduction text to a custom section. In Manage Templates, just add the necessary paragraph in the Description area just as you would for the Introduction section. It can also be added in the XML after </fm-sect-name>, with the code <fm-sect-intro><![CDATA[Intro text example]]></fm-sect-intro> which should be placed.
There is an option to make this introduction text editable when we mass create forms and this option is also supported with the Launch Forms tool.
In Launch Forms, the introduction text can be edited.