aerohub / hugo-identity-theme

Little profile/card-style template for Hugo. Based on Identity by HTML5 UP.
Other
89 stars 44 forks source link

Can't get the form to work #20

Closed epstrada closed 7 years ago

epstrada commented 7 years ago

Hi,

I have the form set up and functional. However, the confirmation message is not displayed on succes.

stp-ip commented 7 years ago

Can you try with the latest changes. A lot of improvements concerning the form went into the latest iteration.

loganblevins commented 7 years ago

Form still isn't working. I registered my domain and got my site key for Invisible ReCaptcha. However, the ReCaptcha isn't invisible. Once I visibly verify to send, nothing happens. The response is a Formspree HTML page, rather than what this code expects.

stp-ip commented 7 years ago

Will try to test and fix any issues with formspree and the latest changes to the form. If you have some more details, that would be appreciated.

loganblevins commented 7 years ago

Sure. Thank you for the quick reply. It appears that Formspree issues a redirect to their webpage, which then has its own ReCaptcha that needs to be verified.

If we try to get around this by implementing our own Inivisible ReCaptcha on the webpage with the actual form, the webpage will not issue a redirect to the Formspree verification page like It would otherwise. The Hugo theme gets the token for verification just fine if we implement Invisible ReCaptcha, but when we check the response for code 200, the code is null which breaks everything. The response handed back to us is actually an HTML page containing the redirect request to Formspree, since Formspree wants to force your form to redirecting and verifying on the Formspree end independently.

My form finally works now, but I had to remove all traces of the Hugo custom Invisible ReCaptcha. Now, Formspree is redirecting to its page and verifying for us. This is very ugly and unfriendly but it works. Apparently to disable Formspree ReCaptcha, we need to upgrade to their paid account level. This is unfortunate. Can this fixed?

stp-ip commented 7 years ago

Probably easiest thing is to add a switch to only use the captcha, when a non formspree config is used.

If you dislike the formspree redirect you can take a look at using gmail/or another smtp capable provider and something like: https://caddyserver.com/docs/http.mailout

epstrada commented 7 years ago

thx! will test again