Have you encountered an error screen with the title "Unable to submit form"? It would look like this:
If so, this article should help you resolve the problem.
If you're seeing this screen it means two things:
- Your request lacks the HTTP "referer" header containing the webpage URL from which the form was submitted.
- The form was set up with an
actionattribute pointing to a Formspree URL that contains an email address. For example:
When the form
action URL contains only an email for identification, Formspree needs additional information contained in the "referer" header to identify the form. These email-based URLs were the original way to integrate with Formspree. Today we've moved to using a form ID in the URL so we no longer rely on the "referer" header.
As the form owner, if you are using an action attribute like
https://firstname.lastname@example.org then we suggest these steps:
- Create a free account at https://formspree.io/register.
- Create a new form. You'll receive an
actionURL that contains a unique form id.
- Use the new URL in place of your previous email-based URL.
This will allow your form to work on all browsers and across all pages of your website. In addition you'll no longer need to expose your email in the form HTML, a potential security issue.
If you would like to transfer your existing submissions over to your new form, please submit a request to our support team and we can take care of it for you.
As the form owner, if you are unable to change the
action attribute of your form, try the following troubleshooting steps. Note, without changing your URL as described in the suggested solution above your form may not load in all browsers. (see below)
- You may encounter this error when testing locally by opening an HTML file directly in your browser. In this case its URL will start with
https://. This will not work because browsers don't treat these pages as normal web resources. Specifically, they don't send the "referer" header. Try running a local web server to host your form page. If you're on Mac or Linux, you can launch a web server by typing the following command on your terminal application:
python -m SimpleHTTPServer 8000Then visit http://localhost:8000 on your browser.
If you're on Windows, try installing one of the following web servers: Web server for Chrome, thttpd or Quickshare.
- If you've configured your form to submit to a url with the
http://protocol, but your form is hosted on a page accessed via the
https://protocol, the "referer" header won't be sent. You'll need to update your
actionURL. In this case we recommend the suggested solution above.
- If you're using the Brave browser, please be aware that Brave may block the "referer" header. This issue has been filed with the Brave team. We'd love your help bringing this to the Brave team's attention by upvoting it.