Magical Forms
  • Introduction to Magical Forms
  • Guides
    • Sending data using HTML
    • Sending data to Google Sheets with vanilla Javascript
    • Submitting Webflow forms to Google Sheets
    • Submitting Carrd forms to Google Sheets
    • Special Fields
    • File uploads
    • Spam Protection
    • Notifications
    • Advanced workflows
  • Integrations
    • Google Sheets
    • Zapier
    • Discord
    • Slack
    • Airtable
    • Notion
  • Platforms
    • HTML forms
    • Javascript
    • React
    • Webflow
    • WordPress
    • Carrd
    • Squarespace
  • Examples
    • Mailing Lists
    • Opt-In Forms
    • Surveys
    • Customer Support
  • Policies
    • What permissions are required to use Magical Forms
    • Privacy Policy
    • Terms & Conditions
  • ← Back to Sheet Monkey
Powered by GitBook
On this page
  • Pick a destination
  • The form action is the link to your destinations
  • Starter HTML
  • Special form fields
  • Redirecting after the form is submitted
  • Limiting what websites can submit to your form
  1. Platforms

HTML forms

How to connect your HTML forms to any destination without writing backend code

PreviousPlatformsNextJavascript

Last updated 2 years ago

All these guides require that you have a If you haven't registered your account, please do that before continuing.

Pick a destination

Magical Forms will do it's best to automatically generate the correct columns or rows in your destination. You can always add more destinations after you create the form.

The form action is the link to your destinations

Once you create a form, Magical Forms will provide a form url or "form action" where you can start posting data. This unique action is all you need to post data into any of your destinations.

Starter HTML

You can easily adapt any form to use your Magical Forms action but Magical Forms also provides some starter HTML for your form in CodePen. Feel free to modify this HTML as much as you want.

Here's an example mailing list form that Magical Forms built:

<form action="https://api.magicalforms.com/form/vB1pUYCBvUqnSarEvAgsd6" method="post">
  <label>Your Name: <input type="text" name="Name" required /></label>
  <label>Your Email: <input type="email" name="Email" required /></label>
  <input type="hidden" name="Created" value="x-sheetmonkey-current-date-time" />
  <input type="submit" value="Sign Up" />
</form>

Once you submit this form to a Google Sheets destination, the data will appear in the linked sheet like this:

Special form fields

Saving a current date and time:

Create a hidden field with a value of x-magicalforms-current-date-time and Magical Forms will automatically convert that value to a date and time in your Google Sheet.

<input type="hidden" name="Created" value="x-magicalforms-current-date-time" />

Saving a current date:

Create a hidden field with a value of x-magicalforms-current-date and Magical Forms will automatically convert that value to a date in your Google Sheet.

Redirecting after the form is submitted

Once a visitor to your website has successfully submitted a form, you often want to redirect them to another location. Magical Forms allows you to do this with the x-magicalforms-redirect field. Put any URL into this field and the user will be automatically redirected to that URL after submitting your form.

<input 
    type="hidden" 
    name="x-magicalforms-redirect" 
    value="https://my-site.com/signup-success.html" 
/>

This special reserved field will not be added to your spreadsheet as a column.

Limiting what websites can submit to your form

Magical Forms allows you to limit the domains that can submit to your form with the "Domains" field. If you want to allow submissions from all locations leave this field blank or enter the * wildcard character.

Magical Forms has a few that make saving certain common types of data easier.

"special fields"
free Magical Forms account.
Example submission for the above form