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
  • Redirecting after the form is submitted
  • Capturing the client IP address from your form submission
  • Inserting data at the top of your sheet
  1. Guides

Special Fields

Magical Forms recognizes special fields to make certain tasks easier

PreviousSubmitting Carrd forms to Google SheetsNextFile uploads

Last updated 2 years ago

Magical Forms has "special fields" that make saving certain common types of data easier.

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 destination.

<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 destination.

Setting the Timezone

All of the times are saved at 0 UTC time. If you want to save dates and times in your own timezone, you'll need to set the timezone in your Magical Form dashboard, under settings.

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 destinations as a column.

Capturing the client IP address from your form submission

You can capture the client IP address from form submissions by adding a hidden field with the value x-magicalforms-ip-address to your form. This can be useful for geocoding user locations or preventing spam.

<input
    type="hidden"
    name="IP address"
    value="x-magicalforms-ip-address"
/>

Magical Forms will automatically convert this value to the IP address of the client who submitted the form.

Inserting data at the top of your sheet

In certain situations you may want to add data to the top of your sheet rather than the bottom, especially in cases where you have a very large sheet. Magical Forms allows you to do this with the x-magicalforms-insert-data-top form field. Add a hidden field to your form with this name and Sheet Monkey will insert the data at the top of your sheet rather than the bottom.

<input
    type="hidden"
    name="x-magicalforms-insert-data-top"
    value="1"
/>

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

x-magicalforms-current-date-time
x-magicalforms-current-date
x-magicalforms-redirect
x-magicalforms-ip-address
x-magicalforms-insert-data-top