Contact form without PHP
An HTML form can send data, but it can't process it. Traditionally a PHP script on your web space does that. If your hosting has no PHP or you don't want to maintain a script, there's another way.
Why forms usually need a PHP script
The browser sends the input to the address in the action attribute. Something has to run there that receives it and forwards it as an email. On classic web hosting that is usually a PHP script using the mail() function.
Static hosts like GitHub Pages, Netlify or Cloudflare Pages don't run PHP. And even where PHP is available, your own script is work: it has to fend off spam, must not be abused to send other people's emails, and the messages should land in your inbox rather than the spam folder.
The alternative: send the form to a service
Instead of your own script, the action attribute points to an address at FormPost. We accept the submission, check it for spam, store it and send you an email. On your site, only this one line changes.
You get the address when you create a form in FormPost. It replaces https://www.formpost.eu/f/abc123 in the code below.
<form action="https://www.formpost.eu/f/abc123" method="POST">
<label for="email">Email</label>
<input type="email" id="email" name="email" required>
<label for="message">Message</label>
<textarea id="message" name="message" required></textarea>
<input type="text" name="_gotcha" style="display:none;" tabindex="-1" autocomplete="off">
<button type="submit">Send</button>
</form>
When your own PHP script is the better choice
If your web space runs PHP anyway, you're happy to maintain the script and the data should stay on your own server, there's nothing wrong with your own script. The same goes if you need something FormPost can't do, such as file uploads or submitting without a page change.
A service pays off if you don't have a server or don't want to deal with spam, deliverability and updates.
Good to know
- Every form is locked to your domain. We reject submissions from other sites so nobody can copy your form address and abuse it.
- The hidden _gotcha field in the code above helps against spam. You can also switch on a simple arithmetic question that runs on our servers – no external captcha service required.
- On the free plan we send up to ten notifications a day. Anything beyond that isn't lost; it's waiting in your dashboard.
What FormPost cannot do today
- Forms are submitted the classic way, meaning the page changes. Sending in the background via JavaScript is not supported at present.
- We do not accept file attachments.
- FormPost does not collect consent from your visitors. The notice in your own privacy policy remains your job – the wording for it is waiting, ready to copy, next to your form.
More guides and comparisons
Create a form and try it
The Free plan covers one form with ten notifications a day and costs nothing, permanently.