Skip to content
This repository has been archived by the owner on Aug 8, 2019. It is now read-only.

Contact form action is not compatible with formspree #117

Closed
tomgoldstein opened this issue Apr 6, 2018 · 14 comments
Closed

Contact form action is not compatible with formspree #117

tomgoldstein opened this issue Apr 6, 2018 · 14 comments

Comments

@tomgoldstein
Copy link

Formspree rejects the email submissions from my browser (chrome). This can be fixed by replacing the line (in contact.html)

<form  action="https://formspree.io/{{ with (or .Site.Params.contact.email .Site.Params.email)}}{{.}}{{ end }}" method="POST" name="sentMessage" id="contactForm">

with

<form  action="https://formspree.io/{{ with (or .Site.Params.contact.email .Site.Params.email)}}{{.}}{{ end }}" method="POST" name="sentMessage">

i.e., by removing the 'id' tag from the form element. I'm not 100% sure why the id tag would cause this problem, or whether this is the best fix, so I'm submitting an issue rather than a pull request.

@stp-ip
Copy link
Collaborator

stp-ip commented Apr 6, 2018

The "id" is used to make the contact form async. Without the "id" it won't touch js code. Any error messages?

@tomgoldstein
Copy link
Author

tomgoldstein commented Apr 7, 2018 via email

@tomgoldstein
Copy link
Author

tomgoldstein commented Apr 7, 2018 via email

@mpourismaiel
Copy link
Contributor

I'm not sure why this happens and I'm afraid I can't reproduce it anywhere. Would you please do the following and let me know the results?

Search for $('form[id=contactForm] #error').show(); and add a debugger; before it. Then submit the form with developer console ope (right click>inspect) and before the error show up it should pause. Go to the console and write arguments, expand the result and take a screenshot.

@jensibunga
Copy link

I had the same problem, it turns out this was the response from formspree:

status 400

{
  "error": "To prevent spam, only Gold accounts may create AJAX forms."
}

@stp-ip
Copy link
Collaborator

stp-ip commented Apr 25, 2018

Then it's a recent change from formspree. Solution would be to disable async code for formspree. That would prevent the issue, but make for a horrible interaction for users and for people having a gold account for formspree.

@tomgoldstein
Copy link
Author

tomgoldstein commented Apr 26, 2018 via email

@stp-ip
Copy link
Collaborator

stp-ip commented Apr 26, 2018

No need for the debugger I assume. As with the ID tag. That would support this error. Without the ID tag the ajax js code isn't triggered and the form would default to being a non ajax form as far as I can see.

@jwynn6
Copy link

jwynn6 commented Jun 2, 2018

Is there a solution to this yet? I'm having the same issue.

@snowyTheHamster
Copy link

i get the error: Message is not sendable due to captcha not loadable. Please contact us at xxx@yyy.com.
The "send message" button is greyed out i cant even click it.

Do i need to set something up other than typing in my email address ?

@stp-ip
Copy link
Collaborator

stp-ip commented Jun 6, 2018

@jwynn6 in terms of solutions. Get a gold account to enable ajax support in formspree or use netlify contact form integration or use a self-hosted email gateway such as caddy mailout.

@snowyTheHamster is the code available somewhere. Assumption would be, that you have noscript or something running, preventing google to load the recaptcha code.

@snowyTheHamster
Copy link

hi @stp-ip thanks for the reply.
it's here https://github.com/snowyTheHamster/demo
The code is mostly untouched from the default.

@stp-ip
Copy link
Collaborator

stp-ip commented Jun 6, 2018

@snowyTheHamster you need to configure recaptcha from Google within your config.toml.

There should also be support to just let netlify handle all of the form stuff. Should be a config option.

Also we are about to release v0.11 of Syna, which could be seen as an iteration of the Agency theme. You can try v0.11.0-beta already. There should be minor changes for the release and might have a few changes down the line, but as long as your submodule is pointing to a tag, shouldn't affect you.

Closing this as the actual issue is fixed (needs a gold formspree account).

@stp-ip stp-ip closed this as completed Jun 6, 2018
@stp-ip
Copy link
Collaborator

stp-ip commented Jun 6, 2018

We just released v0.11.0 for Syna. https://github.com/okkur/syna/releases/tag/v0.11.0

bbest added a commit to ecoquants/watercommonsindex that referenced this issue Oct 21, 2018
bbest added a commit to ecoquants/watercommonsindex that referenced this issue Oct 21, 2018
DaveParr pushed a commit to satRdays/hugo-satrdays-theme that referenced this issue Jan 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants