Every form has a collection of fields. Fields can be of different types; some simple such as a text field, and some more complex such as a signature field or image field. The definition of a field is defined on the Template for which the form is an instance of.

Field Types

The fields collection on a form can be one of the following fields:

Referencing a Field

Form fields can be referenced by an Id or a name. If a template has a text field named "City", for example, retrieving a form based on this template would return the field in the following way:

{
	"fields":  {
  	"City": {
      "text": "San Diego",
      "id": "28b3af03-6ae2-4a1c-9b01-a46c0108d3c5",
      "name": "City",
      "type": "TextBox"
    }
  }
}

📘

Note:

The id, name, and type are not necessary when creating or updating a form, they are returned in the JSON of a request for readability.

In order to assign the field an initial value or to update the value of this field you only need to specify the "name" or the "id" of the field plus the value for that specific field. The following example details setting the value of the text field using the field "name" and the "id":

// by name...
{
	"fields":  {
  	"City": {
      "text": "Las Vegas",
    }
  }
}
// by id...
{
	"fields":  {
  	"28b3af03-6ae2-4a1c-9b01-a46c0108d3c5": {
      "text": "Las Vegas",
    }
  }
}