https://github.com/lwcorp/antispam-contact-form
A 1-page contact form that prevents spam, supports dynamic recepients, auto replies, has dark mode, can log, and more.
https://github.com/lwcorp/antispam-contact-form
contact-form fetch-api html5 logging spam-detection
Last synced: 11 months ago
JSON representation
A 1-page contact form that prevents spam, supports dynamic recepients, auto replies, has dark mode, can log, and more.
- Host: GitHub
- URL: https://github.com/lwcorp/antispam-contact-form
- Owner: lwcorp
- License: agpl-3.0
- Created: 2024-05-21T17:53:48.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-21T18:34:41.000Z (about 2 years ago)
- Last Synced: 2025-03-27T11:41:09.686Z (over 1 year ago)
- Topics: contact-form, fetch-api, html5, logging, spam-detection
- Language: PHP
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Installation
1. Edit the PHP file to reflect basic settings like the address/adresses that should get the mail
1. Run the HTML file
# Features
1. Just 1 page for client (HTML) and 1 page for server (PHP)
1. Every form field can either be GET or POST
1. Triple mode for errors and success - they can be presented right in the form itself, in a blank page or redirect to external pages
1. Dual mode for results - they can be either sent, logged or both
1. The form can be limited to be used in specific domains only
2. Auto reply can be sent automatically
1. The client side uses HTML5 to check for required fields, but the server side can check them too for a double verify

# Advanced
## Server
The configuration file can be used to:
1. Limit the domains that can use the form
1. Enable logging
1. Define auto reply
1. Define required form fields (in case the user tricked the client side)
## Client
You can optionally include these special fields (not having to be hidden, of course):
```html
`
```
Errors and success will appear right in the form itself slowing down the user by redirecting. Use `true` to make them appear in another page.
```html
```
Mention numbers of recpients that should get the results, whereas only the server can know the addresses behind those addresses.
```html
```
Mention a page's URL to link to in case of success:
```html
```
Mention a page's title to link to in case of success:
```html
```
Mention an error page that will always be redirected to on errors.
```html
```
Mention a success page that will always be redirected to on errors.
```html
```
Ask the server to also check if these fields were filled on top of what the server was already defined to check.