Hi,
You have this in your HTML:
That should not be there and is causing it to always fail.HTML Code:<input type="hidden" name="recaptcha_response_field" value="manual_challenge">
Welcome to the Tectite Forums! You can download and get support for our free PHP FormMail (form processor) and other free software.
OK entered site key and now error page says:
An error occurred while processing the form .
reCaptcha verification failed (incorrect-captcha-sol)
Hi,
You have this in your HTML:
That should not be there and is causing it to always fail.HTML Code:<input type="hidden" name="recaptcha_response_field" value="manual_challenge">
Russell Robinson - Author of Tectite FormMail and FormMailDecoder
http://www.tectite.com/
Thanks - that solved the problem.
I am just about there with my custom template, but I am using an incorrect entry for $TEMPLATEDIR:
$TEMPLATEDIR = "/httpdocs/fmtemplates";
I tried it with and without the httpdocs, but I am not sure what the path needs to be. I had understood that the domain name (eyesonafrica.net) was excluded and that this was a directory on my server, but I am confused.
Here is the error I get when I put in an incorrect Captcha now:
Cannot open template '/httpdocs/fmtemplates/fm-error.htm': fopen(/httpdocs/fmtemplates/fm-error.htm) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory
Hi,
That's good news about your progress!
Figuring out the correct directory on a server can be a little challenging.
Your hosting provider should be able to tell you it.
You can also use FormMail's "testalert" test. The email you receive will give you a good idea of the correct directory path.
Another alternative is to use a relative path instead of an absolute path. In this case, you just name the directory relative to the location of formmail.php.
If "fmtemplates" is in the same directory as formmail.php, then you could have:
Note: no slashes at all.PHP Code:$TEMPLATEDIR = "fmtemplates";
If it's in the directory above FormMail, it would be:
PHP Code:$TEMPLATEDIR = "../fmtemplates";
Russell Robinson - Author of Tectite FormMail and FormMailDecoder
http://www.tectite.com/
Great stuff!
The relative reference for the template dir works!
Looks like I am about ready to go live.
Last thing (I think)...
Is there a way to replace generated error text with something more user-friendly?
The only error I would expect now is a bad entry into the ReCaptcha. The generated text from this error is:
reCaptcha verification failed (incorrect-captcha-sol)
It would be preferable if I could somehow replace this text in my error template to something a user would be more likely to understand like:
"Your anti-spam entry was incorrect"
Any way to do this?
What I mean is that although I don't expect other errors, I don't want to assume this and just type in my own message in case a different error does arise.
My form uses a script to check for required entries, so the most common error should be the ReCaptcha, but I also want to be able to test in future for server errors, etc.
So if there is a way to convert the generated text for a specific error type/code, then I would like to make it more understandable to my users.
THX!
Hi,
It would be nice if the reCaptcha server produce a better error message, but the "incorrect-captcha-sol" is all we get.
It's now been documented so we can rely on what it means (previously wasn't documented), so we can improve FormMail to provide a more direct message.
We had to supply "reCaptcha verification failed" because we needed to be generic with the error summary (not having proper documentation from reCaptcha).
However, that's not going to happen until at least the next release of FormMail.
In the interim, you can create a file called "language.inc.php" in the same directory as formmail.php with the following contents:
Of course, if the reCaptcha fails for another reason (such as server problems), that message will be misleading to your users, who may get frustrated.PHP Code:<?php
$aMessages[MSG_RECAPTCHA_MATCH] = 'Your anti-spam entry was incorrect';
?>
Russell Robinson - Author of Tectite FormMail and FormMailDecoder
http://www.tectite.com/
OK - well I think I gotta say that the extra $$ I spent for this support was more than worth it to me - you saved me hours and my time = $$, so thanks.
Form seems to work as it should now and my custom templates too.
---
I have one final question:
What is the most efficient way to update formmail when you release a new version?
Should I make notes of all the entries where I have input my specifics into the formmail.php?
Just wondering which is best method or if there is an easier way than making precise notes in my own text file to be sure I update each setting.
Thanks - awesome product.
James
Hi,
Thanks for the feedback - that's great to hear.
Provided you haven't made any changes to FormMail outside the Configuration Section (which is clearly marked with Start-End comments), you can use our free Upgrade Wizard.I have one final question:
What is the most efficient way to update formmail when you release a new version?
Should I make notes of all the entries where I have input my specifics into the formmail.php?
Just wondering which is best method or if there is an easier way than making precise notes in my own text file to be sure I update each setting.
It copies all your current settings across during the upgrade and provides you with a download that includes the new version and your old version.
If you do change FormMail's logic (i.e. outside the Configuration Section), then you'll need to re-implement any changes you made.
And we can't ever guarantee that the code will look the same. In fact, we can guarantee that newer versions of FormMail will have re-factored code. We're gradually moving to a more Object-Oriented code base which allows a lot more flexibility and a stronger featureset.
Russell Robinson - Author of Tectite FormMail and FormMailDecoder
http://www.tectite.com/
Hi,
I've just been reviewing the reCaptcha instructions and the code supplied by Google.
That hidden field *should* be present, but it *must* be in the <noscript> section of the reCaptcha code.
It's there for when a user has JavaScript switched off in their browser.
I can confirm that our HOW TO guide shows the correct code.
If you place that hidden field anywhere else, it is very likely to stop reCaptcha from working.
Russell Robinson - Author of Tectite FormMail and FormMailDecoder
http://www.tectite.com/
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks