GBCF-v3 Secure & Accessible Form Script
Introducing Mike Cherim's GBCF-v3 Secure and Accessible PHP Contact Form.
Contact form spam is bad for everyone, but with this script you can rest easy knowing your form is safe, accessible, and valid. Now, as 5165157 others have done, you can download it for free. Want to learn more first? Check out the included validation, help (updated 8.04.2018 at 3:12 pm), and test form pages.
Form Version: v3 - Build Number: B3.20090130.01 - Model Number: SASU - Blocked: 27846 - Help »
Form Introduction
The version two of my form, which is also available as a WordPress plugin (this copy is not yet for WP), works well, but there were enough little support-craving issues to warrant creating a version 3. This is it and it's more than just a secure and accessible contact form. This version is feature rich — language support, choices about what inputs to offer, display options, and much more. Plus, even though you won't get this page, the other pages, the validation, help, and test form pages, actually come with the download and are designed to help you set it up and pre-test the script. This version is sophisticated, powerful, flexible, and easy to install (I think so) if you take it a step at a time. So, what do you think?
Form Features
This version is has myriad features and fine details. Way too many to list them all here. But here's a quick overview:
- Easy Usage Terms: While giving credit in the form of keeping the form footer link is cool, as is hiring me, giving a donation (a commission if you're a webby dever), or making a language or style contribution, there are no strings. Don't redistribute it or claim it as your own work and we're good.
- Easy Setup Steps: There are some very advanced features using this form, but with only one file you need to configure (you can edit two), one file to make writable, one include, and two
head
links to make, and some optional styling, it's really quite easy. Start with the README file. - Automatic Accessibility: Designed to not only retain a proper form's inherent accessibility, but to enhance it. It's screen-reader optimized and keyboard friendly. It also uses no JavaScript or cookies. I did the labels differently than version two to help with a sporadic Safari (Mac) issue.
- Hardened Security: Security hardened against spam 'bots, header injection, cross-site scripting (XSS), email harvesters, and in some cases, pesky human users that you can block (if they have the same IP address).
- Highly Configurable: You can have all the fields showing (like the test form), as it is by default, or turn some off. This form can be as lean as the required fields only: Name, Email, Subject, Message, and the Anti-spam Question.
- Persistent Validity: Regardless of what optional fields you have, the form knows what to add or remove to ensure the form stays valid, accessible, and usable. Based on some things I saw with version two, I thought this would be beneficial.
- Language Support: Offers exceptional language support. From a configurable character set, selecting a language also grabs an easy-to-edit language file (if language file exists). The language files, nl, tr, ro, ja, sv, pl, da, ru, es-sp, zh-tw, pt-br, it, sk, zh-cn, el, my, ca, pt, id, fr, no, he, lv, es, cy, en, be, en-us, de, fi, gl, en-gb, are currently available. In use now is the en file. More language files wanted, please.
- Inherent Intelligence: In addition to the ability to remain valid and semantic, everything under the hood happens automatically. Change a form legend and it happens in the email as well. And this is just the beginning. The form script is smart!
- Error Management: Smart yet human-forgiving errors. Get the anti-spam question wrong and you are given the correct answer. Fill in the honeypot and the script clears it for you and tells you to try again.
- Smart Feedback: All errors and users messages are clear and immediately accessible to users. In many cases, where applicable, users are provided with link directing them to the culprit input. User messages, because they are important, are wrapped in
strong
tags. This is quite proper. - Independent Function: No JavaScript, no cookies, if you have PHP 4 or 5 on your server, you're set. Installation, while seemingly complicated due to how much support info is available, is easy. Getting a working installation is a small task. See the help page.
- Input Highlights: Missing a required input - while well marked in three possible configurations - the user is given the error, a link to the input, a border around the input, and a colored, bolded label. Miss that!
- Themes Potential: Until contributors make themes for the download (even some basic color schemes would be cool), the form does come with a style sheet that you can use to help you with form styling. All the classes and IDs are shown to help.
- Back Button Gone: All errors are returned to the same page. No more hitting the back button to fix the problem. And no more lost data experienced by some Safari users on Macs reported with version two. All stuff like that was addressed.
- Blocked/Error Stats: This script will keep track of error-trip statistics which serves as an indictor to the form's effectiveness. Right now all form errors are recorded. Is this overkill? Isolating 'bot errors only isn't possible as some features can be triggered by both man and machines.
- Anti-Flood Control: This version offers an anti-flood control that can be activated if really needed. Flooding is when a user refreshes/re-submits the form repeatedly, sending numerous emails. This feature also provides an aggression level setting.
- Myriad Advanced Settings: Mail server not cooperating? Well this version offers several advanced features to help you get stuff working. There are also configurable input length variables in this section. Possibly useful if you want to change the Phone input to something else, for example.
- Admin Lockdown Mode: New lockdown mode so you can turn your form off during closures, site or form maintenance or re-styling. One user IP address is allowed to access and use the form during lockdown.
- Thank You Option: If you want users who successfully submit the form to wind up on your own custom thank you page, you now can with two easy configuration settings. This, as well as the anti-flood, can be troublesome, depending on several factors.
- Excellent Support: I'm told I offer great support, but I do like people to first try and help themselves. That's why this form comes with it's own help page you can put online during setup. You may also see my help page at any time. Either will offer you the means to help yourself.
Change Log
A brief overview of script changes with upgrade suggestions. Files marked with !!! means those are files you may have edited. (Important: All updates require the version.php
file to be swapped out.)
- B3.20090130.01 Update. The
-f
parameter was changed to be switched via the config file. Swap out thefunctions.php
andCONFIG.php
!!! files. The language filees
was updated so you may want to swap out thees
!!! file. The language filegl
andca
was added. If needed, add the file,gl
andca
files to thelangs
folder. - B3.20081118.01 Update. The
-f
parameter was added to introduce a proper Return-Path allowing better service for some users such as those using AOL accounts. Swap out thefunctions.php
file. The language fileel
was added. If needed, add the file,el
to thelangs
folder. - B3.20081002.01 Update. The language file
pl
was added. If needed, add the file,pl
to thelangs
folder. - B3.20080906.01 Update. The language file
cy
was added. If needed, add the file,cy
to thelangs
folder. - B3.20080731.01 Update. The
form.php
andfunctions.php
files were edited to fix an issue of the CC checkbox not remembering if it's checked during a failed form submission. Swap out the filesform.php
!!! andfunctions.php
!!!. Thehelp.php
page had an FAQ added and a language file, sk, was added, upload them if you need them. - B3.20080622.01 Update. The
form.php
file was edited to remove another instance of thelang
attribute used in the form footerp
, which is not valid in XHTML 1.1. Swap out the fileform.php
!!!. Two variables were added to thefunctions.php
file, managed and added to theCONFIG.php
file. Swap out thefunctions.php
!!! andCONFIG.php
!!! files if you want to keep stay current (recommended due to future upgrades). Thehelp.php
andvalidation.php
files were updated to reflect the aforementioned changes. A language file, id, was added, upload it if you need it. - B3.20080602.01 Update. The
form.php
file was edited to remove instances of thelang
attribute used on the main formdiv
, which is not valid in XHTML 1.1. Swap out the fileform.php
. - B3.20080503.01 Update. The language file
lv
was edited. The language files, pt, zh-cn, zh-tw, and tr were added. If needed, swap out the filelv
!!!. Add the files,pt
,zh-cn
,zh-tw
, andtr
to thelangs
folder. - B3.20080405.01 Update. The
form.php
file was edited (one label changed), one error text was edited in thefunctions.php
file, and a new FAQ was added to thehelp.php
file. The language file, my, was added. Swap out the filesform.php
,functions.php
, andhelp.php
. Add the file,my
to thelangs
folder. - B3.20080312.01 Update. The language files, sv, he and es, were updated (sv and he were actually just re-saved in UTF-8), and the language files, es-sp, de, and pt-br were added. Swap out files
sv
!!!,he
!!!, andhe
!!!, if applicable. Add files,es-sp
,de
, andpt-br
files to thelangs
folder. - B3.20080211.01 Update. A language file, lv, was added. Add file
lv
tolangs
folder. - B3.20080209.02 Update. Whoops. Scratch the last one. I had to do it another way... grrr. Swap out files:
functions.php
andhelp.php
. - B3.20080209.01 Update. An editable function was added to the functions file to correct two issues I discovered when installing this form in a differently-named directory. The help and readme files were also updated. Swap out files:
functions.php
,help.php
, andREADME.txt
. - B3.20080208.01 Update. A bug was found in the functions file allowing thank you page and anti-flood redirect the user on invalid posting attempts. Swap out file:
functions.php
. - B3.20080205.01 Update. A small error was found in the functions file (email case issue). Also, he language file and matching style sheet were added. Swap out file:
functions.php
. Add files:he
to thelangs
folder, and addhebrew.css
to thethemes
folder. - B3.20080203.01 Update. The fr and ro language files were edited. An update was made to the help page FAQs, the form file was slightly modified, and a small error was found in the functions file. Three style sheets were added. Swap out files:
form.php
,help.php
,functions.php
, and thefr
andro
language files. Add files:blue.css
,gray.css
, andorange.css
to thethemes
folder. - B3.20080127.01 Update. A language file, ro, was added. An update was made to the help page addressing the still open issue defined in build
B3.20080124.01
below. Swap out file:help.php
. Add file:ro
. - B3.20080124.01 Update. A language file, no, was added. A small edit was made to fix a
Header Already Output
warning that some sites might experience when using the thank you page or anti-flood features. Swap out file:functions.php
. Add file:no
. - B3.20080115.01 Update. Two language files, be and nl, were added. Add files:
be
andnl
. - B3.20080114.01 Update. A few file updates were made, tweaks, and ru and ja language files were added. Swap out files:
help.php
,form.php
,validation.php
,test-form.php
, andfunctions.php
. And addru
andja
files. - B3.20080109.01 Update. A few file updates were made and a new es language file was added. Swap out files:
help.php
,it
!!!,fi
!!!, anddefault.css
!!!. And addes
file. - B3.20080108.01 Update. A thank you page option was added, some general content changed, and the it language file was updated again. Swap out files:
help.php
,README.php
,functions.php
,validation.php
,CONFIG.php
!!!, andit
!!!. - B3.20080107.01 Update. A couple of typos were found, and a really obscure label association bug was identified and fixed in the
form.php
file. Swap out files:help.php
,README.php
,form.php
, and theCONFIG.php
!!! (typo only so no worries). - B3.20080106.04 Update. Installing mulitple copies ended up being more of a struggle than anticpated, but several changes where made to better accommodate this. When installing multiple copies, you will have to make a few small config-type edits in five files, super simple. Details are avilable in the FAQs. The Italian it language file was tweaked, and the Finnish fi language file has been added. The time zone was removed from the time stamp. A problem with this was found and it wasn't worth the effort to circumvent it. Swap out files:
help.php
,validation.php
,test-form.php
,functions.php
,form.php
, and theit
!!! language file. Add thefi
file. - B3.20080106.03 Update. Based on feedback from users having an undefined function call errors when putting the files more deeply than anticipated, all path negotiations were edited. Swap out files:
form.php
,help.php
,validation.php
,test-form.php
, andfunctions.php
. - B3.20080106.02 Update. An error in the include negotiation was found in the test-form file. Swap out file:
test-form.php
. - B3.20080106.01 Update. A few minor edits/modifications were made and the da, sv, and it language files were added. A correction was made to the fr file. Swap out files:
functions.php
,README.txt
,help.php
,CONFIG.php
!!! (for a typo only), andfr
!!!. And addda
,sv
, andit
files. - B3.20080102.01 Update. A few minor edits were made, a styling fix (bug noted), and the fr language file was added. Swap out files:
functions.php
,README.txt
,validation.php
, anddefault.css
!!!. And addfr
. - B3.20071231.01 First release final. Since last a language file typo was fixed, and an anti-flood control with aggression setting was added. This is a configurable item. Swap out files:
CONFIG.php
!!!,functions.php
,help.php
,validation.php
,en-gb
!!!,en-us
!!!,en
!!!, andversion.php
. - B3.20071230.RC1 Initial release candidate. So far so good, hehe.
Come back now and then to check for upgrades. Every attempt will be made to keep them simple drag-and-drop operations.
Form Contributions
I can't do all this myself. I get by with a little help from others. In the case of this form I would like to acknowledge the following people. (Note: Language files may not appear as they really are on your browser due to encoding.)
- Everyone who helped me with version two, plus...
- Gill Lucraft made this French fr language file.
- Mark Barner made this Danish da language file.
- Tommy Olsson made this Swedish sv language file.
- Pierluigi Montinaro made this Italian it language file.
- Dave and Pirjo Prescott made this Finnish fi language file.
- Joe Dolson helped locate a really obscure label association bug.
- Peter Abrahams for identifying a time zone issue.
- Blair Millen for giving me the idea of adding a thank you page option.
- Mel Pedley and Phil Smears for both offering an indepth script check.
- Gui made this Spanish es language file.
- Roman Matusevich made this Russian ru language file.
- Yoichi Kinoshita made this Japanese ja language file.
- Michel Tournier made these Dutch nl and Belgian be language files.
- Tormod Rangnes made this Norwegian no language file.
- Radu Micu made this Romanian ro language file.
- Jean-Jacques Etotoué edited the French fr language file.
- Ron Roy made me aware of an XHTML 1.1 validation error. I removed the
lang
attribute from theform
element. - Sophie Garrett made me aware of an email case-sensitivity issue. I updated the
functions.php
file to correct the issue. - Oren Farhi made this Hebrew he language file and a matching RTL modified style sheet:
hebrew.css
. - John Nelson reported and identified an issue allowing invalid submissions to redirect.
- Edgars Kalchenko made this Latvian lv language file. Typo later identified by Baiba.
- Laura Moreno made this Spanish (Spain) es-sp language file.
- Brian Templeton updated the Spanish (Central America) es language file.
- Cornelia Kraus made this German de language file.
- Thiago Estrela made this Portuguese-Brazil pt-br language file.
- Wan Assad made this Malay my language file.
- João Alexandre made this Portuguese pt language file.
- Tolga Mirmirik made this Turkish tr language file.
- Jesse Lee made these Simplified Chinese zh-cn (People's Republic of China) and Traditional Chinese zh-tw (Taiwan) language files.
- Michael Venables reminded me of a
lang
attribute usage issue making the form invalid with XHTML 1.1. (maindiv
) - Ode made this Indonesian id language file.
- Jack Toering reminded me of a
lang
attribute usage issue making the form invalid with XHTML 1.1 (form footer). - Michal Miksik made this Slovak sk language file.
- Blair Millen found an error with the CC option when checked during an error submission. It would reset itself.
- Kevin Donnelly and Stefhan Caddick made this Welsh cy language file.
- Piotr Barszczewski made this Polish pl language file.
- Panos Chronopoulos made this Greek el language file.
- DC identified an improper Return-Path issue and proposed the
-f
paramenter solution. - David Zemens confirmed that the Return-Path issue noted previously will not work for all. A switch for the
-f
paramenter was added. - Balbina Escale made this Catalan ca language file.
- Jesus Quintana made this Galacian (Galego) gl language file and revamped the Spanish es language file.
If you would like to be a contributor, style sheets and language files are needed (nl, tr, ro, ja, sv, pl, da, ru, es-sp, zh-tw, pt-br, it, sk, zh-cn, el, my, ca, pt, id, fr, no, he, lv, es, cy, en, be, en-us, de, fi, gl, en-gb, are already done). See the default style sheet and default en language file to serve as working examples or templates if you will. To learn more about this opportunity, use the test form to get in touch. If you have contributor language questions, please see this language help file, then contact Mike if you still need help. Current themes available: default (green), blue, gray, orange, and hebrew.
Copyright © 2007-2024 Mike Cherim. Some rights reserved. [ Top ]