← Back to Documentation

Adding Forms

User input forms are an important part of many websites. However, they typically rely on server-side processing scripts. Since WebHaste renders straight HTML files, it is not able to handle form submissions directly.

The Hack: The User's Email Client

In the case of both of our starter sites, a small JS script is included to send messages from a basic contact form. This is essentially a souped-up mailto: link that opens the user's mail client and lets them send a message from there. However it's not very reliable on mobile devices.

The Better Solution: A Form Provider

Many websites need complex contact forms, email address opt-ins and surveys. There are a number of free and paid services that you can use to set up and manage these forms. The provider will give you an "embed" snippet that you can paste into your website to display the form, eliminating the need for sending mail directly from your hosting server.

Some popular form services:

Inserting the Form into Your Site

In most cases, the form provider can give you at least two options for sending users to your form:

To insert a form into a page via Embed: