Simple Website Contact Form

A simple AJAX & PHP contact form with fallback for when JavaScript is disabled.

After making a number of websites needing a contact form, and not wanting to overload the simpler ones with unnecessary javascript frameworks or other programming bloat, I decided to roll my own. This contact form can be added to any website (static or dynamic), and can either use the back-end server to send the emails, or a third party service provider like Formspree.

It is a very simple form; accepting only name, email, and comments. It avoids the risk of being used to spam others by only sending emails to an address defined in the back-end, not on the client.

If the user has javascript blocked, or is unable to use it due to viewing the website through non-standard software, the form will still work in the same way.

Being made from ordinary HTML allows me to style the form to fit into any of my customers’ websites using standard CSS.