Checkbox fields

Checkbox - a field that can be checked by a checkmark.

When the document owners create a Checkbox field, they may keep it empty, or check it. The state of the Checkbox is defined in the prefilled_text parameter.

Here’s an example of the JSON request body when adding a Checkbox field to a document via API.

{
  "client_timestamp": 1527859375,
  "fields": [
    {
      "page_number": 0,
      "type": "checkbox",
      "name": "CheckboxName",
      "role": "Signer 1",
      "prefilled_text": true,
      "label": "checkboxLabel",
      "required": true,
      "height": 15,
      "width": 11,
      "x": 70,
      "y": 270
    }
  ]
}

In Checkbox fields, prefilled_text parameter accepts boolean values when adding a field to a document. However, when the recipient checks/unchecks the field, prefilled_text contains a string value in JSON document response. This string stands for a boolean.

Parameter Value
prefilled_text=="1" (boolean) the field is checked
prefilled_text=="" (boolean) the field is not checked

Here’s a response example when the Checkbox field has been checked and the Signer submitted the document.

{
  "checks": [],
  "fields": [
    {
      "id": "72aec107797a499c8e85d08f08572ccd86668e60",
      "type": "checkbox",
      "role_id": "ed1fe6496119438081b464f15e47557837626908",
      "json_attributes": {
        "page_number": 0,
        "x": 70,
        "y": 270,
        "width": 11,
        "height": 15,
        "required": true,
        "name": "CheckboxName",
        "prefilled_text": "1"
      },
      "role": "Signer 1",
      "originator": "document.owner@signnow.com",
      "fulfiller": "signer1@gmail.com",
      "field_request_id": "aa64e927972b48858f6090f40c1b4a7b589835e0",
      "element_id": null,
      "field_request_canceled": null,
      "template_field_id": null,
      "field_id": "aa64e927972b48858f6090f40c1b4a7b589835e0"
    }
  ]
}