Formcake is an easy way to configure a form without spinning up a whole backend. It works with traditional server-side rendered sites as well as SPAs / JS-based form solutions.
To use formcake, all your need is the form's submission url (which you can find in your form dashboard under the Install tab).
https://formcake.com/api/form/577cdc9f-c058-41a7-9a02-330a8ca40684/submission
Then just paste that endpoint into your <form>
tag's action
attribute. We're assuming this example is using a traditional form over a JS-based submission.
<form method="POST" action="https://formcake.com/api/form/577cdc9f-c058-41a7-9a02-330a8ca40684/submission">
<input type="text" name="name" value="example"/>
<input type="email" name="email" value="example@formcake.com"/>
<button type="submit">Submit</button>
</form>
Formcake can respond to submissions in three ways.
JSON
response.You can select between these redirect options in the Settings tab of your form.
Once you create a form you can change it's behavior through the forms dashboard.
Redirect: If your submission includes the form header application/x-www-form-urlencoded
your site will perform a redirect. If you've configured a redirect in your form's Settings tab (using a full URL), it will use that redirect.
If you haven't specific a redirect, it will use our default success page.
JSON: If your submission doesn't include the form header application/x-www-form-urlencoded
your submission will return a JSON
response.
Example JSON Response
{
createdAt: "2019-11-07T17:02:38.437Z",
data: {
email: "example@formcake.com",
name: "example",
},
domain: "formcake.com",
formId: "dc99a91f90-jd98dd-41ba-8263-8f897hsd9s7nds97d",
id: 33,
updatedAt: "2019-11-07T17:02:38.437Z",
}
You can see here that the data
is populated by creating a key-value pair, where the key is the name of the form input
and the value is the input's value.
To ensure your form doesn't receive spam submissions you can configure multiple domains to whitelist. Formcake will reject any submissions that don't come from these sources. If you don't configure any domains, your form will be considered anyonmous, and anyone will be able to post to it.
Whitelisted domains are added in a form's Settings tab in the form dashboard or during the form creation process.
When you receive a form submission, you can trigger an action (found in the Actions tab).
Each form can have any number of actions, bounded only by your plan's limitations.
The Email Notification action sends the designated address an email with your form submission data presented in table form.
Required Fields
Field Name | Description |
---|---|
action name | The name you'd like to give your action |
form | The UUID of the form you're attaching the action to |
email address | The address of the email's recipient |
email subject line | The email's subject line |
The Email Template action sends the designated address an email with the option of formatting your form submission data using a Liquid template.
Required Fields
Field Name | Description |
---|---|
action name | The name you'd like to give your action |
form | The UUID of the form you're attaching the action to |
email address | The address of the email's recipient |
email subject line | The email's subject line |
email content | The body of the email you're sending, templated with the values of your form using Liquid |
The Webhook action sends a POST
request to the URL of your choice with your form submission data included within a data
object in the body
of the HTTP request.
Required Fields
Field Name | Description |
---|---|
action name | The name you'd like to give your action |
form | The UUID of the form you're attaching the action to |
url | The URL you would like the webhook to POST to |
basic auth | Add a HTTP Basic Auth username/password string to your webhook. |
headers | Custom headers you'd like to include in your request |
key replacements | User key replacements to map your form submission data to new property keys. |
Example Webhook Request
{
url: "https://formcake.com/example",
domain: "formcake.com",
formId: "dc99a91f90-jd98dd-41ba-8263-8f897hsd9s7nds97d",
dtCreated: "2019-12-05T02:28:23.742Z",
email: "example@formcake.com",
name: "example",
}
Coming Soon
You can test any of your Formcake Forms by going to the Install tab and submitting content via step 4. This will count towards your account's submission limit and will behave exactly as it would if you installed the Formcake form on any other platform. This is useful for making sure that all of your actions fire and is best used as a final integration step.
Instead of testing all the actions at once, you can go to the Actions tab and test individual actions. This will not count towards your account's submission limit. When
you test an individual action you are prompted for JSON. Even though your submissions may be coming through as either
application/x-www-form-urlencoded
or
application/json
that content is always converted to JSON before being sent to our lambdas. Therefore to test the action you need to provide the content that a submission will
eventually become. In the latter case, it's unchanged from its original JSON structure. In the former, each key/value pair becomes a JSON key/value.
There are no limits to how many submissions an individual form can receive, or to how long or how much data is stored. Check the pricing page for more information on our per-account limits and go to the account page if you'd like to change your plan and those limits.
Note that for free "Sandbox" plans we will immediately drop all submissions over the limit threshold. For "Developer" and above plans we'll work to contact the owner about an upgrade first.
Submissions can be exported as a CSV by going to the Submissions section of your chosen form.