Form2Channel Docs


Method 1: Form recipients in hidden fields

Use this method if you are happy to add the form recipient info in hidden fields into the form html

  1. Add this form tag
    <form action="https://form2channel.com" method="POST">
  2. Add any number of form recipients like
    <input type="hidden" name="formto_email" value="me@email.address">
    <input type="hidden" name="formto_googlesheets" value="me@email.address">

    For formto_googlesheets the Form2Channel service creates a Google Sheet and gives the email address you provide here full permissions

    See an example form

  3. Upload the page to a server
    Localhost is not allowed

For submissions to Google Sheets or Email no further setup is necessary


Method 2: Using an API Key

When a valid APIKey is provided, the form does not need to contain hidden fields containing recipient information.

Use this method if you want to hide the form recipient info and you only have one recipient.

You can generate an APIKey in the form below and either add it to the querystring or submit it in a hidden input tag

<form action="https://form2channel.com/?apikey=the key you generated below" method="POST">

or
<input type="hidden" name="formto_apikey" value="the key you generated below">

See an example form

APIKey Generator

We DON'T share or sell your contact information

Email setup

Add a hidden field that contains the recipent like below or generate an API Key

<input type="hidden" name="formto_email" value="me@email.address">

Google Sheets setup

Add a hidden field that contains the recipent like below or generate an API Key

<input type="hidden" name="formto_googlesheets" value="me@email.address">

The Form2Channel service creates a Google Sheet and gives the email address you provide here full permissions


Slack setup

To create a Slack webhook

  1. Go to https://api.slack.com/apps
  2. Add an app to a workspace
  3. Activate "Incoming Webhooks"
  4. Select "Add new webhook to workspace" (bottom)
  5. Optionally, in the "OAuth & Permissions" section you can restrict the API token usage to the Form2Channel IP address 13.79.230.33
  6. Add a hidden input tag to your form
    <input name="formto_slack" type="hidden" value="Url of the Slack Webhook">
Slack Docs: https://api.slack.com/start/overview#creating

Example form


Telegram Setup

To get a Telegram ChatID

  1. Open this page on your phone and click the link
  2. Send /start to @Form2ChannelBot to get a ChatID
  3. Add a hidden input tag to your form
    <input name="formto_telegram" type="hidden" value="The Chat ID the Form2Channel Telegram bot sent you">

Example form


Webhook Info

You can use the formto_http method when contacting a webhook or another API.

Add an http address into a hidden field

<input type="hidden" name="formto_http" value="Address of the receiving webhook or api">

The receiving address must accept a Json array of objects (key/value pairs) like this

    [
        {"key":"FirstName","value":"John"},
        {"key":"LastName","value":"Lennon"},
        {"key":"Country","value":"United Kingdom"},
        {"key":"Subscribed","value":"checked"},
        {"key":"Gender","value":"Male"},
        {"key":"File","value":"https://form2channel.com/images/built-with-linx.svg"}
    ]

Example form


Post your data directly to our Linx REST API

You can skip the form altogether and submit your data directly to our API as a Json object

    [
        {"key":"formto_email","value":"me@email.address"},
        {"key":"formto_email","value":"me2@email.address"},
        {"key":"formto_googlesheet","value":"me@email.address"},
        {"key":"FirstName","value":"John"},
        {"key":"LastName","value":"Lennon"},
        {"key":"Country","value":"United Kingdom"},
        {"key":"Subscribed","value":"checked"},
        {"key":"Gender","value":"Male"},
        {"key":"File","value":"https://form2channel.com/images/built-with-linx.svg"}
    ]

The API response consists of a Json object with two variables:
  1. Message (String)
  2. Success (boolean)
{"Message":"Form submitted","Success":true}

Thank you page

Without a formto_redirect field visitors are redirected to the website default page with the result in the querystring like

?result={"Message":"Form submitted","Success":true}

If you add a hidden field into your form we will redirect visitors accordingly

<input name="formto_redirect" type="hidden" value="Url or page to redirect visitors to on success">

Error page

If something goes wrong visitors are redirected to the website default page with the result in the querystring like

result={"Message":"Some error message","Success":false}

You can add the hidden field below into your form to redirect visitors when an error occurs

<input name="formto_error" type="hidden" value="Url or page to redirect visitors to on error">


Synchronous message sending

To make sending faster, all messages are queued by default. Every 10 seconds, a process picks up the messages from the queue and sends them.

Adding a hidden input field with the name formto_immediate will cause messages to be sent immediately.

The disadvantage in using this is that the page visitor needs to wait while the backend connects to the external systems and sends the messages.

<input type="hidden" name="formto_immediate">


Multiple forms

When adding multiple forms to one website include a form identifyer in the form action querystring like

<form action="https://form2channel.com/?form=contactus" method="POST">

<form action="https://form2channel.com/?form=customerinfo" method="POST">


Multiple recipients

Comma-separate multiple recipients for a channel

<input type="hidden" name="formto_email" value="me@email.address, me2@email.address">

<input type="hidden" name="formto_googlesheets" value="me@email.address, me2@email.address">


Honeypot spam filtering

When the Form2Channel service detects a value in a form field (input or textarea) with the name formto_honey submission will be ignored.

<textarea name="formto_honey" style="display: inline; width: 0px; height: 0px; border: 0; padding: 0; margin: 0"></textarea>

The honepot anti-spam technique is a popular anti-spam prevention method. The idea is that the styling on this field hides the field from the user, but Spam bots will still detect the field in the html and may populate it. In my personal experience, this method does not work very well, but it seems to work better with textarea fields than input fields.

To reliably prevent spam bots from submitting your forms, I recommend you look into using the method described in this repo https://github.com/rodenacker/FormSpamPrevention


File uploads

Forms that contain file upload tags must have the enctype="multipart/form-data" attribute, like so

<form action="https://form2channel.com" method="post" enctype="multipart/form-data">

Add any number of single or multiple file upload tags to the form, like so

<input type="file" name="fieldname1">

<input type="file" name="fieldname2[]" multiple>

The following limits and cautions apply to file uploads

  1. Max size per file: 20MB
    Larger files are discarded

  2. Max POST size: 40MB
    Larger posts will fail
  3. File retention: 30 days
    Files are deleted after 30 days
  4. File accessibility not restricted
    Until deletion all files are accessible to anyone with the url
  5. File safety not guaranteed
    Files have not been scanned for viruses

API limits

To prevent our API from being abused to spam recipients, the following limits apply

  1. Add up to 4 email recipients per IP address every 30 days
  2. Add up to 4 Google Sheet recipients per IP address every 30 days
  3. Submitting from locally hosted pages is not permitted