Define forms and form fields
Define forms and form fields
Technologies > User Interface Add-Ins > Parts for Forms > With 3-column Field Layout and Multiple Layout Options
By default, the edit form will display all fields listed in the
dataSource
element, using standard
Archibus field formatting and titles as defined for each field in the
data schema. The form will have two columns and the field labels will
be displayed to the left of input controls.
Edit forms support a number of options that change the default field
display. These options will be reviewed using the baseline edit form AXVW
shown below. Note that all panel elements must define a unique
id
attribute:
<panel type="form" id="emForm" dataSource="emDs">
<title>Employee</title>
<action id="save">
<title>Save</save>
<command type="saveForm"/>
</action>
<field table="em" name="em_id"/>
<field table="em" name="em_std"/>
</panel>
Change the number of columns:
<panel type="form" columns="1" ...>
Display labels on the top of input controls:
<panel type="form"
labelsPosition="top" ...
>
The panel can contain its own list of fields, which enables a number of per-field options. All fields listed in the panel must be defined in the dataSource as well. The dataSource defines which fields will be loaded from the database; the panel defines how these fields will be displayed.
Add separating spaces between fields (each empty
field
element will occupy the position and
area of a normal field, but will not display any content):
<field table="project" name="requestor"/>
<field/>
<field table="project" name="date_commence_work"/>
Set fields to read-only or hidden. Although hidden fields are not displayed on the form, their values are loaded from the database when the form is displayed. The user cannot change these values, but they are still sent to the server when the user saves the form data:
<field table="project" name="project_id"
hidden="true"
/>
<field table="project" name="requestor"
readOnly="true"
/>
Date/time form fields typically display the field value in read-only format directly below the form field. In order to suppress this feature, use the
showText
attribute:
<field table="mo" name="date_req" showText="false"/>
To customize field titles,