Field Types

Field Types Overview - Sets, Choices, and Other Fields

Section

A section is a logical divider of the form. Sections may contains many form elements, and have sections nested beneath them.

Classification Field

Classification sets let you predefine hierarchies and schemas for classifying data into a standard format from the field.

Choice Field

A ChoiceField is a form element to allow a list of selectable options. There are two ways to define the options of a ChoiceField. You can define the choices inline with the ChoiceField, or you can use Choice Lists to define a set of choices that can be shared across multiple forms. Both methods of defining the choices are supported by the API. See the API documentation for Choice Lists for information on how to manage Choice Lists.

ChoiceField elements must have either:

If both the choice_list_id and a choices array are given, choice_list_id will be the object used in validation and on the mobile device. You may use null or not include it in the object. It’s recommended to only supply one or the other in the form definition.

Attributes specific to a ChoiceField:

Yes / No Field

Yes/No fields behave just like Single Choice fields, but present a different UI on the Fulcrum mobile client apps that allows you to quickly choose Yes, No or N/A without selecting from a list.

Attributes specific to YesNoField:

See a JSON object of an example form that contains a valid YesNoField definition.

Photo Field

This field allows photos to be captured using the mobile device. Each Photo field allows any number of photos to be added to it.

Time Field

Time fields validate and store relative time (no timezone) with the time in 24-hour format like:

13:30

Conditionals

Every element in the form may have two types of conditionals: required_conditions (to force data entry into the given field) and visible_conditions (to hide/show fields dynamically – to enable “decision tree”-like functionality). These allow for special conditions to be met before a field can be shown or a record can be created on the mobile device. These conditions are not used in the validation process for record upload.

Condition attributes are not required. They are only required if the type fields are specified as below:

The example below shows the structure of a field with two visibility conditions. In this case, this “yes/no” selector field for capturing whether a venue has wifi or not is only displayed if the user selects “Diner” or “Coffee Shop” from another choice field earlier in the form:

{
  "allow_other": false,
  "choices": [
    {
      "label": "Yes",
      "value": "Y"
    },
    {
      "label": "No",
      "value": "N"
    }
  ],
  "data_name": "wifi",
  "default_value": null,
  "description": "Does the venue have wifi?",
  "disabled": false,
  "hidden": false,
  "key": "key",
  "label": "Wifi?",
  "multiple": false,
  "required": false,
  "required_conditions_type": null,
  "type": "ChoiceField",
  "visible_conditions": [
    {
      "field_key": "field_key",
      "operator": "equal_to",
      "value": "Diner"
    },
    {
      "field_key": "field_key",
      "operator": "equal_to",
      "value": "Coffee Shop"
    }
  ],
  "visible_conditions_type": "any"
}