Change Contact Form CAPTCHA Question
I 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 :)
December 4th, 2007 at 10:55 pm
Hi,
I changed it like Step 3 says, but i am getting a little popup screen error message while trying to test the form. The popup up says; Field answer_out not valid.
Want did i do wrong? Thanks
March 21st, 2008 at 7:12 pm
Thanks. I just registered on your blog. I tried to change the Spam question to a string and I think I followed the instructions as was described for both files . I clicked SUBMIT and received the error message:Field answer_out not valid. Any ideas? Also, the question is not visible. Is that a function of the style sheet?
Thanks.