DEV Community

Cover image for How to add a contact form to a static website

How to add a contact form to a static website

Silvestar Bistrović on July 19, 2019

This post was originally published on Codementor. With the rise of static sites, developers need a service that could handle forms. Static website...
Collapse
 
trostcodes profile image
Alex Trost

Very cool, I didn't know about this one. I'll give it a look.

I always use Netlify for hosting, and their forms package is built-in and free up to 100 submissions.

Collapse
 
starbist profile image
Silvestar Bistrović

Netlify forms is a way to go, for sure. But they are lacking some features, like client-side validation.

Collapse
 
rnrnshn profile image
Olimpio

I was looking for this... Thanks 😊

Collapse
 
starbist profile image
Silvestar Bistrović

I am glad to hear that. Good luck!

Collapse
 
haosik profile image
Nikolay Mochanov

What if "some user" deletes rules attributes by dev tools?

Collapse
 
miguejarias profile image
Miguel Arias

Hi Nikolay, im Miguel Co-Founder of Kwes.

The rules are synced server side on page load. So if someone tries to delete any rules via devtools, it will not affect the form in anyway since the rules were already synced and saved server-side every time the form is loaded. Same goes for the number of fields, the type attribute, etc. this means it also prevents people from injecting fake fields via devtools as well. Any of those changes via devtools are ignored by Kwes.

Collapse
 
starbist profile image
Silvestar Bistrović

I am not sure how to prevent users/devs from messing around with dev tools. If you find out how, let me know. ✌

Collapse
 
ypedroo profile image
Ynoa Pedro

Very cool thanks

Collapse
 
abdurrahmaanj profile image
Abdur-Rahmaan Janhangeer

Nice and easy option!

Collapse
 
srezas profile image
SeyedReza SeyedMohseni

Do you know any library witch directly sends an email with logged information on the Contact-Us page?

Collapse
 
starbist profile image
Silvestar Bistrović

What do you mean? Could you explain, please?