A Field is an item in a Form which can be used to collect data from the user. The type of data collected depends on the Field type. For example, a Choice field collects a choice that a user makes within a choice set. A Media field can request that the user takes a photo (Photo field), a video (Video field) or audio recording (Audio field) and a Text field allows the user to provide a written response.
However, regardless of the Field type all fields share a set of basic attributes. These attributes can be included within the Field tag to fine tune the functionality of each Field. Note that there may be subtle behavioural changes for the same attribute across different Field types, therefore it is important to also consult the XML specification for the different Field types alongside this one.
Attribute | Required | Values | Default value | Explanation |
---|---|---|---|---|
id | Yes if the field is a root | Any text | n/a | A unique identifier for a particular field |
caption (aka: label) | No | Any text | n/a | A written description of what this field represents (to display alongside the field where necessary). |
optional | No | true, false | false | Whether or not the user can skip this field without entering information. |
jump | No | Any text (id of an existing field) | n/a | The ID of the field to jump to once the user has finished with this field, or one of the special jumps documented here. |
skipOnBack | No | true, false | false | Whether or not this field should be skipped when the user goes backwards through fields they have already encountered. This behaviour could be useful in fields such as Location or Orientation. |
showOnCreate | No | true, false | true | Whether or not to show this field when the user is in ‘create’ mode (they are creating a new record, rather than editing an existing one). |
showOnEdit | No | true, false | true | Whether or not to show this field when the user is in ‘edit’ mode (they are editing an existing record). |
editable | No | true, false | true | Whether or not the value originally set for this field can later be changed when the user is in ‘edit’ mode. |
showBackOnCreate | No | true, false | true | Whether or not to show the ‘back’ button when the user is on this field and in ‘create’ mode. |
showBackOnEdit | No | true, false | true | Whether or not to show the ‘back’ button when the user is on this field and in ‘edit’ mode. |
showCancelOnCreate | No | true, false | true | Whether or not to show the ‘cancel’ button when the user is on this field and in ‘create’ mode. |
showCancelOnEdit | No | true, false | true | Whether or not to show the ‘cancel’ button when the user is on this field and in ‘edit’ mode. |
showForwardOnCreate | No | true, false | true | Whether or not to show the ‘forward’ button when the user is on this field and in ‘create’ mode. |
showForwardOnEdit | No | true, false | true | Whether or not to show the ‘forward’ button when the user is on this field and in ‘edit’ mode. |
showBack | No | true, false | true | Whether or not to present the ‘back’ button to the user on this field. NOTE: Overrides mode-specific settings above. |
showCancel | No | true, false | true | Whether or not to present the ‘cancel’ button to the user on this field. NOTE: Overrides mode-specific settings above. |
showForward | No | true, false | true | Whether or not to present the ‘forward’ button to the user on this field. NOTE: Overrides mode-specific settings above. |