Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/knrt10/static-contact-validatedform
You can use this in your static websites in contact form and get notified in your email address without any spam emails. :fire:
https://github.com/knrt10/static-contact-validatedform
Last synced: about 2 months ago
JSON representation
You can use this in your static websites in contact form and get notified in your email address without any spam emails. :fire:
- Host: GitHub
- URL: https://github.com/knrt10/static-contact-validatedform
- Owner: knrt10
- License: mit
- Created: 2018-07-11T05:39:56.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-13T12:08:44.000Z (about 5 years ago)
- Last Synced: 2024-11-04T02:32:48.257Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 25.4 KB
- Stars: 22
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
## What is its use?
You can add a contact form in your static website like site hosted on Github and able to get response from user.
### Some Cool Features
Sometimes people try to span your email and you get anonymous emails. To avoid this, I have created this so that one has to authenticate their emails before sending message to you.
- Avoid Spam emails
- Check for blacklisted mail servers
- Can add as many **name** fields in your HTML form.
- Get IP address of the sender
- Avoid DDOS attacks## Preview
![Preview](https://res.cloudinary.com/dsyvg5xwi/image/upload/v1531587414/out3_hpfi8i.gif)
## Initial Setup
```bash
git clone [email protected]:knrt10/static-contact-validatedForm.gitcd static-contact-validatedForm/
touch .env #create .env file
copy keys of .env.example in your .env file and fill all the details
```
## How to setup your form
1.) Follow [Initial Setup](#initial-setup)
2.) Host it on any domain you want, I would suggest [Zeit Now](https://zeit.co/docs/v2/introduction/)
3.) Add an `.env` file in your root folder for reference see [.env.example](https://github.com/knrt10/static-contact-validatedForm/blob/master/.env.example)
4.) Add this to form in your static site
- **Paste your endpoint into your form**
*Change your form's action attribute like this:*
**Important** method should be **GET**
```html
```
- **Add name attribute to every field**
*Inputs, textareas, selects, radios should have unique name attributes*
```html
```
**name** field in html form for **email** field is mandatory. Rest you can add as many as you want.- **All set, you're ready to collect submissions** :fire: Enjoy.
## Development
First follow [Initial Setup](#initial-setup) then you can use develop using 2 methods
#### Docker
```bash
npm run dockerStart # To start the service
npm run dockerStop # To stop the service
```You can access your app at port specified in your `.env` file or **3000**
#### Local Development
```bash
#install dependencies
npm install#start the service
npm start```
## license
MIT [@knrt10](https://github.com/knrt10)