Form2Channel Docs

Contents


Basic Form setup

  1. Add this form tag
    <form action="https://form2channel.com" method="POST">
  2. Add hidden tags for form recipients (see example form) like
    <input type="hidden" name="formto_googlesheets" value="me@email.address">

    <input type="hidden" name="formto_email" value="me@email.address">
  3. Upload the page to your server
    Localhost is not allowed

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


Adding 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">


Adding 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">


Thank you and error pages

By default the process redirects visitors to the website default page with the result in the querystring like

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

You can add the hidden field below into your form to redirect visitors to after a successful or failed submission

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

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


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: 4MB
    Larger files are discarded

  2. Max POST size: 8MB
    Larger posts will fail
  3. File retention: 30 days
    Files are deleted after 30 days
  4. File accessibility is public
    All files are accessible to anyone in posession of the url
  5. File safety not guaranteed
    Files have not been scanned for viruses

Spam prevention

To prevent spamming, the following limits apply

  1. Up to 10 email recipients per site
    You can add to these recipients every 10 days
  2. Up to 10 Google Sheet recipients per site
    You can add to these recipients every 10 days
  3. Submitting from locally hosted pages is not permitted

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}

Spam prevention limits are applied to the calling IP address