Available with CloudCannon hosting.
Create contact forms for your sites. CloudCannon sends named form data to email addresses of your choosing.
To create a contact form:
- Add an HTML form to a file
- Set the
methodattribute to post
- Set the
actionto where the visitor is redirected after the form submission
- Add form fields with
nameattributes to collect data from visitors
Use these fields to customise the email CloudCannon sends through the form. The fields can be hidden or visible depending on your requirements.
The address (or addresses) that CloudCannon sends the email to. Send the email to multiple addresses by separating them with commas.
_hook is defined, this field will not be used.
The value used for the Reply-To header in the email. Use this to ensure clients reply to the visitor rather than a default CloudCannon address.
The subject of the email.
The value used for the CC header in the email. Use this to send a copy in another address (or addresses) without sending it directly. Send a copy of the email to multiple addresses by separating them with commas.
Instead of sending an email, a webhook can be supplied for the data to be sent to.
Honeypot field for preventing untargeted spam. CloudCannon does not send the email if this field has a value. Hide it with CSS to prevent visitors filling it out.
For better spam prevention try using Google reCAPTCHA.
Submitting with AJAX
- Build and test your contact form
- Override the submit event on your form
- Change the page to notify your viewers the message was sent
To protect your information and prevent spam these fields are encrypted before being served to the user.
_hook field allows you to supply a webhook that you control in order to process the form submission outside of email. The data is sent as a POST request with the Content Type
For security, we currently allow hooks from the following platforms to be used:
If you have use cases beyond these platforms, send us a message.
Note that IFTTT does not support custom JSON keys. Webhook Applets have access to the three keys
value3, the quantity and naming of which is fixed. This means that you will have to reflect this structure in your form, i.e.
Zapier and Automate do not have a limitation on the number of fields or custom keys.
reCAPTCHA embeds a CAPTCHA in your page preventing targeted and untargeted spam. CloudCannon does not send the email if the CAPTCHA fails to validate. reCAPTCHA requires additional configuration in the Site Settings.
To add reCAPTCHA to your site:
- Sign up for an API key at https://developers.google.com/recaptcha/
- Add the form element by following the instructions at the reCAPTCHA documentation.
- Add the secret and key to Site Settings / Forms
Once configured, any form submissions that fail to validate will return a 401 error page.