Output data structure

{
  "options": {
    // Section "options"
  },
  "data": {
    // Section "data"
  }
}

Section "options"

Here you will find all additional information describing the form, e.g. checking the session, the session itself, the name of the form, etc.

Section "data"

Here are all the fields added to the form. Each field has several attributes:

type

Type of field to be sent.

id

The identifier of the sent field.

value

Field value.

Important!
This is a field value but one that is not configurable. For fields of the text type, it will be the same as the "output" attribute, but for fields of the select type, for example, it will always indicate the identifier of the selected option, that is the "value" parameter.

The "output_value" setting does not work on this field.

label

Field label.

output

Output field value. This value is set in the parameter "output_value".

ContentType

This attribute will only be added for the "file" field.

It indicates the type of attachment.

Filename

This attribute shall be added only in case of the "file" field.

It shall indicate the name of the attachment.

Example

{
  "options": {
    "check_session_id": false,
    "name": "Application for vacation leave - Copy",
    "session_id": "undefined"
  },
  "data": {
    "OTRS_Ticket_Owner": {
      "type": "text",
      "id": "OTRS_Ticket_Owner",
      "value": "+48 123 321 123",
      "label": "Phone number",
      "output": "+48 123 321 123"
    },
    "UserFirstName": {
      "type": "text",
      "id": "UserFirstName",
      "value": "John",
      "label": "First name",
      "output": "John"
    },
    "UserLastName": {
      "type": "text",
      "id": "UserLastName",
      "value": "Doe",
      "label": "Last name",
      "output": "Doe"
    },
    "UserFirstAndLastName": {
      "type": "comparefield",
      "id": "UserFirstAndLastName",
      "value": "Your Name: John Doe",
      "label": "User first name and last name",
      "output": ""
    },
    "carModel": {
      "type": "text",
      "id": "carModel",
      "value": "Nissan Note",
      "label": "Car",
      "output": "Nissan Note"
    },
    "carType": {
      "type": "text",
      "id": "carType",
      "value": "PO 123321",
      "label": "Registration number",
      "output": "PO 123321"
    },
    "1_7_IssueType": {
      "type": "select",
      "id": "1_7_IssueType",
      "value": "Car",
      "label": "I have a problem with",
      "output": "Car"
    },
    "dateTime": {
      "type": "datetime",
      "id": "dateTime",
      "value": "2020-05-28 12:00:00",
      "label": "Multiple date and time",
      "otrs_visible": "all",
      "output": "2020-05-28 12:00:00"
    },
    "dateTime2": {
      "type": "datetime",
      "id": "dateTime2",
      "value": "2020-05-08 12:00:00",
      "label": "Date range",
      "otrs_visible": "all",
      "output": "2020-05-08 12:00:00"
    },
    "Name": {
      "type": "text",
      "id": "Name",
      "value": "John Example",
      "label": "Your name",
      "output": "John Example"
    },
    "OTRS_Ticket_Title": {
      "type": "text",
      "id": "OTRS_Ticket_Title",
      "value": "Example PDF",
      "label": "Example PDF",
      "output": "Example PDF"
    },
    "Cars": {
      "type": "checkbox",
      "id": "Cars",
      "value": [
        "BMW"
      ],
      "label": "Cars",
      "output": []
    },
    "Rules1": {
      "type": "checkbox",
      "id": "Rules1",
      "value": [
        "I Agree to Terms #1"
      ],
      "label": "Rules",
      "output": []
    },
    "Rules2": {
      "type": "checkbox",
      "id": "Rules2",
      "value": [
        "I Agree to Terms #2"
      ],
      "label": "Rules2",
      "output": []
    },
    "Cars1": {
      "type": "radio",
      "id": "Cars1",
      "value": "Mercedes",
      "label": "Cars",
      "output": ""
    },
    "ckEditor": {
      "type": "ckeditor",
      "id": "ckEditor",
      "value": "<p><strong>1232</strong></p>\n",
      "label": "CKEditor",
      "output": "<p><strong>1232</strong></p>\n"
    },
    "23SelectCity": {
      "type": "text",
      "id": "23SelectCity",
      "value": "London",
      "label": "City",
      "otrs_visible": "all",
      "output": "London"
    },
    "Number1": {
      "type": "number",
      "id": "Number1",
      "value": "123",
      "label": "Number",
      "otrs_visible": "all",
      "output": "123"
    },
    "Textarea": {
      "type": "textarea",
      "id": "Textarea",
      "value": "Hello,\nHello,\nHello,\nHello,\nHello,\nHello,\nHello,",
      "label": "Textarea",
      "otrs_visible": "all",
      "output": "Hello,\nHello,\nHello,\nHello,\nHello,\nHello,\nHello,"
    },
    "fileField": {
      "type": "file",
      "id": "fileField",
      "value": "BASE64 Content",
      "label": "Attachment",
      "output": {},
      "ContentType": "application/octet-stream",
      "Filename": "piler 28052020 - FOSS.md"
    }
  }
}