Forum for discussing general topics related to Couch.
17 posts Page 2 of 2
The type 'recaptcha' input raises errors like all other Couch inputs (the 'require' parameter is not really needed as Google will always validate the captcha at each submission).

As mentioned in the docs on form, your form then should display the errors either in bulk - e.g.
Code: Select all
<cms:if k_error >
    <font color='red'><cms:each k_error ><cms:show item /><br /></cms:each></font>
</cms:if>

Or with individual field - e.g. assuming the name of the captcha field is 'recaptcha_test', you should test for a variable named 'k_error_recaptcha_test' as follows
Code: Select all
<cms:input name='recaptcha_test' type='recaptcha'/><br>

<cms:if k_error_recaptcha_test>
    <font color='red'><cms:show k_error_recaptcha_test /></font><br>
</cms:if>

@oldcelt, are you using any of those two in your form?
I wasn't but I'll give it a go!

CouchCMS is brilliant but needs a lot of study to get the finer points embedded in the old brain :)

I'm sure I'll get there in the end - thanks again for the instant help.
KK wrote: <cms:if k_error_recaptcha_test>
<font color='red'><cms:show k_error_recaptcha_test /></font><br>
</cms:if>[/code]
@oldcelt, are you using any of those two in your form?

Each individual field on the form did have the above but the recaptcha_test didn't. That sorted it - thank you!
Hi!! How are you? I am having a problem with an integration with the google captcha. I dont know why it doesnt work.
I config the couch/config.php with the secret and site key of google captcha. Also, in the login.html (in theme/_system) this:
<cms:input name='recaptcha_test' type='recaptcha'/> and also i put in the addon/captcha the
require_once( K_COUCH_DIR.'addons/recaptcha/recaptcha.php' );

Well, the problem is that i see and i can do the verification of the captcha in the login, but in the case that i didn't do the verification of the captcha (i only put the USER/PASSWORD), and then click in "login", i can login.

How can i do if i want that the captcha has been required for the login?

Sorry if my english is bad!!

Regards!
Hi @calejandro :)

From what I could gather, you are trying to add the captcha to the 'login' form of Couch admin-panel. Right?
If so, just making it show in the form won't be sufficient as the core code processing the login form will remain unaware of the new addition and will just ignore it (which you have seen).

The correct way is to 'override' the default login processing mechanism of Couch and then do all the processing yourself (which would include validating the captcha also).

This could be a little advanced if you are only just beginning with Couch but please take a look at 'extended-users' -
viewtopic.php?f=5&t=8581

You may use the technique shown there to create your own login form with whatever modifications you desire.

Hope this helps.
Hi Guys!

First of all thanks to all for adding the details to include Google Recaptcha into CouchCMS. But I tried to include it following these steps but always I get the following error:

Code: Select all
ERROR: Tag "input" has unknown type "recaptcha"


Somebody has had this issue? I'm working with CouchCMS 2.1

Once again thanks for your help. Hoping can help me.
@kpadron,
That is very unexpected; this addon is now a part of the core so it gets included automatically.

Could you please check and let me know the exact version and build of Couch in use on your site?
You should see that info at the bottom of the admin-panel's sidebar (if not, please open 'couch/header.php' in your text editor and you should find the info somewhere around line 52).
17 posts Page 2 of 2
cron