• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 
Author Message
 Post subject: How to install Recaptcha on CGBetterForm
PostPosted: Tue Mar 05, 2019 11:16 am 
Offline
Forum Members
Forum Members

Joined: Sat Aug 02, 2008 9:08 pm
Posts: 188
Hi,
i'm trying to install a Recaptcha (or Invisible Recaptcha) on a CG BetterForm, but with Captcha module active or not (code pasted in the templates directly) i can't achieve it.
It seems that the submit function doesn't take care at the Captcha state.
If anybody has an example of working integration... !!
Thanks for help !


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: How to install Recaptcha on CGBetterForm
PostPosted: Tue Mar 05, 2019 2:52 pm 
Online
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Feb 25, 2009 4:25 am
Posts: 816
Location: Victoria, BC
I'd be happy to help you out with this directly if you get stuck, but I think you just need to add the default validators. (Validation tab, click on "auto add validations" then save your form.

_________________
Not getting the answer you need? CMSMS support options


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: How to install Recaptcha on CGBetterForm
PostPosted: Tue Mar 05, 2019 5:26 pm 
Offline
Forum Members
Forum Members

Joined: Sat Aug 02, 2008 9:08 pm
Posts: 188
Hi, thanks for replying !

I got these validators yet :
Detect HTML tags in form input
Validate the value of select fields
Validate that all required fields are present
Ensure a reasonable value for all email fields

But i can still send the form without checking the box " i'm not a robot " from recaptcha.

My Form template:
\$1:
<form>

  <div>
     <label for="myname">Name</label>
     <input id="myname" class="form-control" name="name" value="{$form_data->name}" required/>
  </div>

  <div>
     <label for="myemail">Email</label>
     <input id="myemail" class="form-control" type="email" name="email" value="{$form_data->email}" required/>
  </div>

  <div>
     <label for="comments">Comments</label>
     <textarea id="comments" class="form-control" name="comments" required>{$form_data->contents}</textarea>
  </div>

  <div class="g-recaptcha" data-sitekey="mykey"></div>

  <div>
    <button type="submit" class="fdorange">Send</button>
  </div>
</form>



The div containing the captcha :
\$1:
<div class="g-recaptcha" data-sitekey="mykey"><div style="width: 304px; height: 78px;"><div><__iframe src="https://www.google.com/recaptcha/api2/anchor?ar=1&amp;k=...></__iframe></div><textarea id="g-recaptcha-response" name="g-recaptcha-response" class="g-recaptcha-response" style="width: 250px; height: 40px; border: 1px solid rgb(193, 193, 193); margin: 10px 25px; padding: 0px; resize: none; display: none;"></textarea></div></div>


In the head:
\$1:
<__script__ src="https://www.google.com/recaptcha/api.js" async="" defer=""></__script>


Is something missing? ::)


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: How to install Recaptcha on CGBetterForm
PostPosted: Tue Mar 05, 2019 5:31 pm 
Online
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Feb 25, 2009 4:25 am
Posts: 816
Location: Victoria, BC
Oh I didn't notice you weren't using the Captcha module. No idea then.

_________________
Not getting the answer you need? CMSMS support options


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: How to install Recaptcha on CGBetterForm
PostPosted: Tue Mar 05, 2019 5:48 pm 
Offline
Forum Members
Forum Members

Joined: Sat Aug 02, 2008 9:08 pm
Posts: 188
I retried with the Captcha Module on, and same result ! I can send the form without checking the box :s


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: How to install Recaptcha on CGBetterForm  [DONE]
PostPosted: Tue Mar 05, 2019 5:59 pm 
Online
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Feb 25, 2009 4:25 am
Posts: 816
Location: Victoria, BC
With the Captcha module installed there's a few steps you have to do:
-configure the Captcha module
-edit your CGBF form template to include the captcha tag and error display items (see the cgbf docs and/or the sample form templates)
-re-add the the auto validations. If the captcha tag (not captcha code, but the cgbf-specific captcha tag) is detected in your form template, the captcha validation will be added.

_________________
Not getting the answer you need? CMSMS support options


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: How to install Recaptcha on CGBetterForm
PostPosted: Tue Mar 05, 2019 8:06 pm 
Offline
Forum Members
Forum Members

Joined: Sat Aug 02, 2008 9:08 pm
Posts: 188
Oh, it works now with your steps to do! Many many thanks !! ;)


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
A2 Hosting