Change Contact Form CAPTCHA Question
Wednesday, August 29th, 2007I recently had the following question from a FCF user:
QUESTION
Hi, I’d like to either simplify that math question or change it to something different. How can I do this?
ANSWER
Luckily the script is build to allow you to do this very easily. To simplify the math question, follow these simple steps.
Step One:
Open config.php in your favorite text/script editor.
Step Two:
Go-to line number 97 (or there abouts), look for the following 2 lines of code:
$rnumA = rand(0,49);
$rnumB = rand(0,49);
Step Three:
To make the math question single digits, change the above 2 lines to:
$rnumA = rand(0,9);
$rnumB = rand(0,9);
Step Four:
Save config.php and upload to your webserver.
If you would prefer to remove the math question altogether and replace with some other question, follow these steps:
Step One:
Open config.php in your favorite text/script editor.
Step Two:
Go-to line number 102 (or there abouts), look for the following 2 lines of code:
$question = "$rnumA plus $rnumB?";
$answer = $rnumA+$rnumB;
Step Three:
Change the question and required answer to something like this:
$question = "What day comes after monday?";
$answer = "tuesday";
(You can change the question and answer to pretty much anything you like!)
Step Four:
Open process_form.php and goto line 118 (or there abouts), look for the following line of code:
if($ans_one === $ans_two) {
Change the above line to:
if(strtolower($ans_one) === strtolower($ans_two)) {
This change removes the case sensitive restriction!
Step Five:
Save config.php and process_form.php then upload them to your webserver.
I told you it was easy :)