Emailing through a contact form on a static site is possible, right?

What is the name of the domain?

test.com

What is the issue you’re encountering

Finding a way to send an email through a contact form.

What steps have you taken to resolve the issue?

Any help or direction is appreciated, I’m a total newbie, so bear with me - I’ll try and keep it short.

I hired a web dev to make a static site an host it here. It needs a basic contact form like this: https://submit.pages.dev
So that a visitor can send an email and have it forwarded to my address.

They made a site in wordpress, and I think that may be causing issues. As the cloudflare pages docs seem to show forms as a limitation.

Here’s what I’ve been told:

Actually cloudflare does not support the dynamic contact forms of wordpress so the contact form is currently not working. Also cloudflare isn’t allowing to use wordpress admin so I suggest you to use another host.

the problem is not with WordPress, The Email function doesn’t work on Cloudflare directly so it’s unable to send emails. It’ll be the same for Hugo or something else, emails won’t work.

I have checked the html forms you shared, that’s static html and doesn’t support sending emails.
<<<

From the docs and other examples off site, it seems this should be entirely possible, though the framework might need to be changed - but that may just be my ignorance speaking.

So, apologies for the stupid questions…

Do I need to host somewhere else to use a basic contact form that will forward an email?
Will a different framework like Hugo, etc, make this possible?
Does this dev know what they’re talking about, or am I crazy?
Can you point to docs or other resources to help?

Thanks, any help is appreciate.

You could try using one of the online forms systems like https://www.cognitoforms.com/ to create your form and then embed the HTML in a static page, thats what we have done in the past with plain html sites

1 Like

I would say yes. You can’t send emails from a static HTML file. Sending emails requires a backend.

If you want to use Cloudflare pages, you’ll have to implement a backend for the form yourself. You would also need a service that provides an HTTP API for sending emails, as this is not something Cloudflare provides.

I’d recommend you just find a different hosting platform for your Wordpress site.

2 Likes

Thanks, I’ve been checking the docs, and I’m wondering if something like formspree (Add an HTML form with Formspree · Cloudflare Pages docs) or Static form pages plugin (Static Forms · Cloudflare Pages docs) would work here?

Using wordpress isn’t necessary. It was originally meant to be done with Hugo.

1 Like

Thanks, I guess this is like formspree that’s suggested in the cloudflare docs?

Sure, that would work, as they would provide the backend and email service in this case.

This doesn’t really do that much. You’d still need an email service that you can call via an HTTP API to actually send your emails.

2 Likes

Thanks very much for you advice!

Yes, except it has a free tier as well - design your form on their website and then just include some code, which they supply, to integrate the form on your site

They handle everything for you

1 Like

Hi, I’d like to also suggest form-data.com
I’m the founder so I’m a bit biased :joy_cat:
The main advantage is the almost perfect spam filtering which I’m really proud of, and we also offer a free tier.

Btw, form-data is 100% built on cloudflare, so it is possible to handle form submissions youself on cloudflare. But I certainly wouldn’t suggest it, because it’s a lot more complicated than you could imagine. Sending emails is the easy part via services like sendgrid or others. But making sure that you are not flooded with spam-bot submissions is really hard.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.