Overview

Forms send data into stories, by posting it to a webhook agent via a UI assembled from user-input fields. Each story comes with a form builder to which a receiving webhook agent can be attached. Once the form is ready for use, a public or private link can be shared with users. A public form is accessible to anyone who knows its public URL.

Creating a form

Each story comes with an empty form that can be found under the Form tab in the story diagram. The form can be edited to fit your needs with the aid of the form builder.

Form button

There are seven types of fields that can be added to the form, all including input validation such as:

  • ensuring the field is filled in
  • setting a max character count on the input
  • ensuring a valid email address is entered into an email field

When a new field is added, choose its type from the dropdown. To rearrange the order of fields, drag and drop it in the right panel.

Field type

Once the form is ready for use, a webhook agent should be selected to receive the submitted user inputs. When a webhook agent is added to the story, it becomes available for selection in the Receiving Agent dropdown.

Receiving agent

Once the receiving agent is attached, you can click the submit button on the form to send data to the webhook. It can be viewed, by navigating to the agent’s most recent events.

Finally the Public toggle sets whether the form is visible to anyone who has the public URL. To copy the public link to your clipboard enable the toggle and click the “Copy Public Link” button. If the toggle is disabled, the form is only visible to signed-in Tines users via the private URL. The private URL is copied to your clipboard after clicking the “Copy Private URL” button, when the toggle is disabled.

Field types

Short Text

The default field created, a single-line text input with a “Max characters” option.

Long Text

A multi-line text input which expands as the user types, with a “Max characters” option.

Email

A single-line text input which requires a valid email address.

URL

A single-line text input which requires a valid URL.

Date

A date input. The data sent to the webhook is in the ISO 8601 date format.

Option

A field allowing users to choose from a set of specified options. When “Multi select” is checked, the options are displayed as a set of check-boxes, otherwise the field is displayed as a dropdown allowing a single selection.

File Upload

A field for uploading a file by clicking on the field or dragging and dropping a file onto it. Takes one file as input, up to 20mb in size.

Form submission

The links to share the form can be obtained by clicking the “Copy Private Link”/”Copy Public Link” in the form builder. When users navigate to the form, fill in the required fields & submit, the data is sent to the receiving webhook agent. The following is the shape of the event emitted:

{
  "webhook_agent": {
    "body": {
      "short_text_1": ""
    }
  }
}