API Docs
HomeDocsWebsite
  • Home
  • Introduction
    • Authorization
      • Authorize
      • Get a Token
      • Third-Party Login
    • Field Types and Validation
      • Field Types
      • Validation
    • Query Manipulation
      • Constraints
      • Result Control
      • Value Filters
    • Entity Permissions
      • Restricted Scope
  • API reference
    • Infoboard
      • InfoboardChannels
      • InfoboardPosts
      • InfoboardPostSeenUsers
      • InfoboardPostReadUsers
      • InfoboardComments
      • InfoboardDepartmentSettings
    • Manual
      • ManualChapters
      • ManualEntries
      • ManualEntrySeenUsers
    • Calendar
      • Calendars
      • CalendarEvents
    • Filemanager
      • FilemanagerDirectories
      • FilemanagerFiles
    • Files
    • Forms
      • Forms
      • FormFields
      • FormFieldTypes
      • FormFieldValidations
      • FormFieldValidationTypes
      • FormMessages
      • FormMessageFields
    • Layouts
      • Layouts
      • LayoutRows
      • LayoutColumns
      • LayoutColumnLayoutElements
    • Tasks 2.0
      • TaskTemplates
      • TaskFields
      • TaskAssignments
      • TaskExecutions
      • TaskProgressFields
    • Departments
    • Roles
    • Permissions
    • Users
    • EntityPermissions
    • Notifications
    • Reactions
    • Icons
    • Folders
    • SharedItems
    • UrlContext
  • Resources
    • Release Notes
      • v2.106.0
      • v2.102.0
Powered by GitBook
On this page
  • Introduction
  • Model Definition
  • List
  • Show
  • Send
  • [Adm.] List
  • [Adm.] Create
  • [Adm.] Update
  • [Adm.] Delete
  1. API reference
  2. Forms

Forms

PreviousFormsNextFormFields

Last updated 4 months ago

Introduction

The Form is the base component which needs to be configured to provide Forms to an . It keeps general information about the Form behaviour and settings.

Usually there is at least one attached to a Form.

Model Definition

Alias

form

Relations

Relation
Key
Type
Relation Field(s)

user

Belongs to

user_id

icon

Belongs to

icon_id

formFields

Has many

form_fields.form_id

formMessages

Has many

form_messages.form_id

layouts

Has many

layouts.layoutable_type, layouts.layoutable_id

Computed Properties

  • hash - The hashed id of the Form

Traits

  • Sortable

  • HasFolder

  • Layoutable

List

Definition

GET /api/forms

Example Request

$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/forms', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);

Example Response

[
  {
    "id": 1,
    "user_id": 6,
    "icon_id": 27,
    "folder_id": null,
    "name": "Form-1",
    "slug": "form-1",
    "subject": "\"{{FORMULARNAME}}\" wurde von {{BENUTZERNAME}} \u00fcbertragen",
    "recipient": ["info@intratool.de"],
    "always_send_to_recipient": false,
    "has_personal_info": false,
    "user_confirmation_required": true,
    "request_receipt": false,
    "request_confirmation": false,
    "email_template": "{{ALLE_FELDER}}",
    "active": true,
    "sort_number": 1,
    "created_at": "2019-01-22 10:44:18",
    "updated_at": "2019-01-24 14:04:48",
    "grade_scale": null,
    "send_empty_fields": false,
    "send_description_fields": false,
    "hash": "zn7m24owk63qolxryge8pj05"
  },
  {
    "id": 2,
    "user_id": 2,
    "icon_id": 70,
    "folder_id": null,
    "name": "Form-2",
    "slug": "form-2",
    "subject": "\"{{FORMULARNAME}}\" wurde von {{BENUTZERNAME}} \u00fcbertragen",
    "recipient": ["info@intratool.de"],
    "always_send_to_recipient": false,
    "has_personal_info": false,
    "user_confirmation_required": true,
    "request_receipt": false,
    "request_confirmation": false,
    "email_template": "{{ALLE_FELDER}}",
    "active": true,
    "sort_number": 2,
    "created_at": "2019-01-25 11:30:43",
    "updated_at": "2019-01-25 11:34:42",
    "grade_scale": null,
    "send_empty_fields": false,
    "send_description_fields": false,
    "hash": "6o8m0kz5yw10x1pr9e4vxj27"
  }
]

Show

Show a single Form by id.

Definition

GET /api/forms/{id}

Example Request

$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/forms/1', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);

Example Response

{
  "id": 1,
  "user_id": 6,
  "icon_id": 27,
  "folder_id": null,
  "name": "Form-1",
  "slug": "form-1",
  "subject": "\"{{FORMULARNAME}}\" wurde von {{BENUTZERNAME}} \u00fcbertragen",
  "recipient": ["info@intratool.de"],
  "always_send_to_recipient": false,
  "has_personal_info": false,
  "user_confirmation_required": true,
  "request_receipt": false,
  "request_confirmation": false,
  "email_template": "{{ALLE_FELDER}}",
  "active": true,
  "sort_number": 1,
  "created_at": "2019-01-22 10:44:18",
  "updated_at": "2019-01-24 14:04:48",
  "grade_scale": null,
  "send_empty_fields": false,
  "send_description_fields": false,
  "hash": "zn7m24owk63qolxryge8pj05"
}

Send

Send an existing Form by id.

Definition

POST /api/forms/{id}/send

Request Keys

Key
Type
Default
Description

form_id **

integer

-

The related Form

Keys with * are required. Keys with ** are normalized to the information given by the route.


Example Request

$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('POST', '/api/forms/1/send', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);

Example Response

{
  "status": "success",
  "data": {
    "form_id": 4,
    "user_id": 2,
    "department_id": 1,
    "body": "",
    "subject": "\"Form-4\" wurde von intratool Service (intratool) übertragen",
    "updated_at": "2019-01-25 13:17:15",
    "created_at": "2019-01-25 13:17:15",
    "id": 2,
    "sent_at": "2019-01-25 13:17:15",
    "hash": "6o8m0kz5yw10x1pr9e4vxj27",
    "form": {
      "id": 4,
      "user_id": 2,
      "icon_id": 70,
      "folder_id": null,
      "name": "Form-4",
      "slug": "form-4",
      "subject": "\"{{FORMULARNAME}}\" wurde von {{BENUTZERNAME}} übertragen",
      "recipient": ["info@intratool.de"],
      "always_send_to_recipient": false,
      "has_personal_info": false,
      "user_confirmation_required": true,
      "request_receipt": false,
      "request_confirmation": false,
      "email_template": "{{ALLE_FELDER}}",
      "active": true,
      "sort_number": 3,
      "created_at": "2019-01-25 13:16:09",
      "updated_at": "2019-01-25 13:16:11",
      "grade_scale": null,
      "send_empty_fields": false,
      "send_description_fields": false,
      "hash": "2w54q7xmvk1drl8ygeo96jrd",
      "form_fields": [
        {
          "id": 10,
          "form_id": 4,
          "form_type": "form",
          "form_field_type_id": "text",
          "name": "Field-1",
          "key": "field-1",
          "default_value": "",
          "placeholder": null,
          "description": null,
          "config": {},
          "sort_number": 1,
          "created_at": "2019-01-25 13:16:09",
          "updated_at": "2019-01-25 13:16:09",
          "field_validation_string": "",
          "field_type": {
            "id": "text",
            "icon_id": 72,
            "name": "Eingabefeld",
            "default_config": {},
            "unique": false,
            "relevant": true,
            "sort_number": 1,
            "created_at": "2019-01-21 00:00:00",
            "updated_at": "2019-01-21 00:00:00"
          },
          "form": {
            "id": 4,
            "user_id": 2,
            "icon_id": 70,
            "folder_id": null,
            "name": "Form-4",
            "slug": "form-4",
            "subject": "\"{{FORMULARNAME}}\" wurde von {{BENUTZERNAME}} übertragen",
            "recipient": ["info@intratool.de"],
            "always_send_to_recipient": false,
            "has_personal_info": false,
            "user_confirmation_required": true,
            "request_receipt": false,
            "request_confirmation": false,
            "email_template": "{{ALLE_FELDER}}",
            "active": true,
            "sort_number": 3,
            "created_at": "2019-01-25 13:16:09",
            "updated_at": "2019-01-25 13:16:11",
            "grade_scale": null,
            "send_empty_fields": false,
            "send_description_fields": false,
            "hash": "2w54q7xmvk1drl8ygeo96jrd"
          },
          "field_validations": []
        }
      ]
    },
    "form_message_fields": [
      {
        "form_message_id": 2,
        "form_field_id": 10,
        "value": "--",
        "request_value": null,
        "updated_at": "2019-01-25 13:17:15",
        "created_at": "2019-01-25 13:17:15",
        "id": 4,
        "form_field": {
          "id": 10,
          "form_id": 4,
          "form_type": "form",
          "form_field_type_id": "text",
          "name": "Field-1",
          "key": "field-1",
          "default_value": "",
          "placeholder": null,
          "description": null,
          "config": {},
          "sort_number": 1,
          "created_at": "2019-01-25 13:16:09",
          "updated_at": "2019-01-25 13:16:09",
          "field_validation_string": "",
          "field_type": {
            "id": "text",
            "icon_id": 72,
            "name": "Eingabefeld",
            "default_config": {},
            "unique": false,
            "relevant": true,
            "sort_number": 1,
            "created_at": "2019-01-21 00:00:00",
            "updated_at": "2019-01-21 00:00:00"
          },
          "form": {
            "id": 4,
            "user_id": 2,
            "icon_id": 70,
            "folder_id": null,
            "name": "Form-4",
            "slug": "form-4",
            "subject": "\"{{FORMULARNAME}}\" wurde von {{BENUTZERNAME}} übertragen",
            "recipient": ["info@intratool.de"],
            "always_send_to_recipient": false,
            "has_personal_info": false,
            "user_confirmation_required": true,
            "request_receipt": false,
            "request_confirmation": false,
            "email_template": "{{ALLE_FELDER}}",
            "active": true,
            "sort_number": 3,
            "created_at": "2019-01-25 13:16:09",
            "updated_at": "2019-01-25 13:16:11",
            "grade_scale": null,
            "send_empty_fields": false,
            "send_description_fields": false,
            "hash": "2w54q7xmvk1drl8ygeo96jrd"
          },
          "field_validations": []
        }
      }
    ],
    "user": {
      "id": 2,
      "username": "intratool",
      "first_name": "intratool",
      "last_name": "Service",
      "active": 1,
      "group_account": 0,
      "role_id": 1,
      "profile_picture": null,
      "street": null,
      "zipcode": null,
      "city": null,
      "email": null,
      "phone": null,
      "birthdate": null,
      "gender": null,
      "entering_date": null,
      "leaving_date": null,
      "staff_number": null,
      "wants_email_notifications": 1,
      "created_at": "2019-01-21 00:00:00",
      "updated_at": "2019-01-21 00:00:00",
      "deleted_at": null,
      "default_route": null,
      "full_name": "intratool Service"
    }
  }
}

[Adm.] List

Get a list of all Forms.

Definition

GET /api/administration/forms

Example Request

$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/administration/forms', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);

Example Response

[
  {
    "id": 1,
    "user_id": 6,
    "icon_id": 27,
    "folder_id": null,
    "name": "Form-1",
    "slug": "form-1",
    "subject": "\"{{FORMULARNAME}}\" wurde von {{BENUTZERNAME}} \u00fcbertragen",
    "recipient": ["info@intratool.de"],
    "always_send_to_recipient": false,
    "has_personal_info": false,
    "user_confirmation_required": true,
    "request_receipt": false,
    "request_confirmation": false,
    "email_template": "{{ALLE_FELDER}}",
    "active": true,
    "sort_number": 1,
    "created_at": "2019-01-22 10:44:18",
    "updated_at": "2019-01-24 14:04:48",
    "grade_scale": null,
    "send_empty_fields": false,
    "send_description_fields": false,
    "hash": "zn7m24owk63qolxryge8pj05"
  },
  {
    "id": 2,
    "user_id": 2,
    "icon_id": 70,
    "folder_id": null,
    "name": "Form-2",
    "slug": "form-2",
    "subject": "\"{{FORMULARNAME}}\" wurde von {{BENUTZERNAME}} \u00fcbertragen",
    "recipient": ["info@intratool.de"],
    "always_send_to_recipient": false,
    "has_personal_info": false,
    "user_confirmation_required": true,
    "request_receipt": false,
    "request_confirmation": false,
    "email_template": "{{ALLE_FELDER}}",
    "active": true,
    "sort_number": 2,
    "created_at": "2019-01-25 11:30:43",
    "updated_at": "2019-01-25 11:34:42",
    "grade_scale": null,
    "send_empty_fields": false,
    "send_description_fields": false,
    "hash": "6o8m0kz5yw10x1pr9e4vxj27"
  }
]

[Adm.] Create

Create a new Form.

Definition

POST /api/administration/forms

Request Keys

Key
Type
Default
Description

icon_id

integer

70

name *

string

-

The name of the Form (unique by all Forms)

slug

string

Slugged name

The slugged name of the Form (unique by all Forms)

recipient *

email

-

subject

string

Default value

The subject of the Form

email_template

string

Default value

always_send_to_recipient

boolean

false

send_empty_fields

boolean

false

send_description_fields

boolean

false

has_personal_information

boolean

false

user_confirmation_required

boolean

true

request_receipt

boolean

false

request_confirmation

boolean

false

sort_number

integer

Current highest +1

The index of the Form

Keys with * are required.

Example Request

$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);

Example Response

[Adm.] Update

Update an existing Form by id.

Definition

PUT /api/administration/forms/{id}

Request Keys

Key
Type
Description

icon_id

integer

name *

string

The name of the Form (unique by all Forms)

slug

string

The slugged name of the Form (unique by all Forms)

recipient *

email

subject

string

The subject of the Form

email_template

string

always_send_to_recipient

boolean

send_empty_fields

boolean

send_description_fields

boolean

has_personal_information

boolean

user_confirmation_required

boolean

request_receipt

boolean

request_confirmation

boolean

sort_number

integer

The index of the Form

Example Request

$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('PUT', '/api/administration/forms/1', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'json' => [
        'user_id' => '3',
        'name' => 'Form-1-changed',
        'recipient' => ['service@intratool.de']
    ]
]);

Example Response

{
  "status": "success",
  "data": {
    "id": 1,
    "user_id": 6,
    "icon_id": 27,
    "folder_id": null,
    "name": "Form-1-changed",
    "slug": "form-1-changed",
    "subject": "\"{{FORMULARNAME}}\" wurde von {{BENUTZERNAME}} \u00fcbertragen",
    "recipient": "service@intratool.de",
    "always_send_to_recipient": false,
    "has_personal_info": false,
    "user_confirmation_required": true,
    "request_receipt": false,
    "request_confirmation": false,
    "email_template": "{{ALLE_FELDER}}",
    "active": true,
    "sort_number": 1,
    "created_at": "2019-01-22 10:44:18",
    "updated_at": "2019-01-25 11:52:43",
    "grade_scale": null,
    "send_empty_fields": false,
    "send_description_fields": false,
    "hash": "zn7m24owk63qolxryge8pj05",
    "icon": {
      "id": 27,
      "identifier": "nc-box",
      "title": "Box"
    }
  }
}

[Adm.] Delete

Delete an existing Form by id.

Definition

DELETE /api/administration/forms/{id}

Example Request

$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('DELETE', '/api/administration/forms/3', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);

Example Response

{
  "status": "success",
  "data": {
    "id": 3,
    "user_id": 2,
    "icon_id": 70,
    "folder_id": null,
    "name": "Form-3",
    "slug": "form-3",
    "subject": "\"{{FORMULARNAME}}\" wurde von {{BENUTZERNAME}} \u00fcbertragen",
    "recipient": ["info@intratool.de"],
    "always_send_to_recipient": false,
    "has_personal_info": false,
    "user_confirmation_required": true,
    "request_receipt": false,
    "request_confirmation": false,
    "email_template": "{{ALLE_FELDER}}",
    "active": true,
    "sort_number": 3,
    "created_at": "2019-01-25 11:53:56",
    "updated_at": "2019-01-25 11:54:00",
    "grade_scale": null,
    "send_empty_fields": false,
    "send_description_fields": false,
    "hash": "d54q7g6wnj1eylm8k9e0xpz2",
    "icon": {
      "id": 70,
      "identifier": "nc-list",
      "title": "Liste"
    }
  }
}

Get a list of all Forms the current authenticated is allowed to view.

By sending a Form, the are triggered. These ensure that the input of the match the expected input for the used .

The related

Array of the email adress(es) to recieve the (seperated by comma)

The template used to generate the body

Whether to send the also to the recipient when a recipient-select is present in the Form

Whether empty should be present in the body

Whether description should be present in the body

Whether the is shown to Group Accounts

Whether a confirmation of a specific is required in Group Accounts

Wether the recipients of the should confirm the reciept

Wether the recipients of the should accept or decline the content

The related

Array of the email adress(es) to recieve the (seperated by comma)

The template used to generate the body

Whether to send the also to the recipient when a recipient-select is present in the Form

Whether empty should be present in the body

Whether description should be present in the body

Whether the is shown to Group Accounts

Whether a confirmation of a specific is required in Group Accounts

Wether the recipients of the should confirm the reciept

Wether the recipients of the should accept or decline the content

User
FormField
Restrictable
User
FormFieldValidations
FormFieldValidations
FormMessageFields
FormFields
User
Icon
FormFields
FormMessages
Layouts
Icon
FormMessage
FormMessage
FormMessage
FormField
FormMessageFields
FormMessage
FormFields
FormMessage
FormMessage
User
FormMessage
FormMessage
Icon
FormMessage
FormMessage
FormMessage
FormField
FormMessageFields
FormMessage
FormFields
FormMessage
FormMessage
User
FormMessage
FormMessage