close ad
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Trying to integrate reCAPTCHA v2

Thread began 5/24/2018 5:17 am by mrs | Last modified 5/25/2018 11:33 am by mrs | 1633 views | 8 replies


Awesome, that seems to have done the job of it not submitting if the reCAPTCHA hasn't been checked. However, it has overridden any error message for the reCAPTCHA which isn't particularly UX friendly, so I am trying to add my own invalid state... but guess what... I can't make it work!

I have this for the server behaviours:

if ((isset($_POST["Insert"]) || isset($_POST["Insert_x"]))) {
$WAFV_Redirect = "".(htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES)) ."?invalid=true";
$_SESSION['WAVT_requestcallback_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateRQ((isset($_POST["fld_cb_title"])?$_POST["fld_cb_title"]:"") . "",true,1);
$WAFV_Errors .= WAValidateRQ((isset($_POST["fld_cb_fname"])?$_POST["fld_cb_fname"]:"") . "",true,2);
$WAFV_Errors .= WAValidateRQ((isset($_POST["fld_cb_lname"])?$_POST["fld_cb_lname"]:"") . "",true,3);
$WAFV_Errors .= WAValidateEM((isset($_POST["fld_cb_email"])?$_POST["fld_cb_email"]:"") . "",true,4);
$WAFV_Errors .= WAValidateRQ((isset($_POST["fld_cb_country"])?$_POST["fld_cb_country"]:"") . "",true,5);
$WAFV_Errors .= WAValidateRQ((isset($_POST["fld_cb_telephone"])?$_POST["fld_cb_telephone"]:"") . "",true,6);
$WAFV_Errors .= WAValidateRQ((isset($_POST["fld-cb_calltime"])?$_POST["fld-cb_calltime"]:"") . "",true,7);
$WAFV_Errors .= WAValidateRQ(($succMsg) . "",true,8);

if ($WAFV_Errors != "") {

And I have this for my validation error message:

<div class="lineGroup">
<div class="g-recaptcha" data-sitekey="qwertyuioplkjhgfdsazxcvbnm"></div>
if (ValidatedField('requestcallback','requestcallback')) {
if ((strpos((",".ValidatedField("requestcallback","requestcallback").","), "," . "8" . ",") !== false || "8" == "")) {
if (!(false)) {
?><span class="serverInvalidState" id="$succMsg">Hmmm... it seems you might be a robot! Click to prove you're not.</span><?php //WAFV_Conditional request-call-back.php requestcallback(7:)

I assume I'm missing something from the Server Validation behaviour because there seems to be nothing to tie the reCAPTCHA to the invalid state. What, I don't know though!

Just thinking on the fly as I type this, should I add a name or ID to the reCAPTCHA that can then be picked up by the WA Server Validation panel?

Thanks so far Ray.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...