genemu/GenemuFormBundle

How I add a reload link for reCaptcha widget?

Closed this issue · 13 comments

Sometimes happen that image is not clear at all and I need to reload the image for get a new one see the image below for example what I'm talking about:

untitled1

How do I add that link?

That is the problem of all captcha system. Sometime, you get one with this type of problem. It is why some captcha provide a way to load a new image.

In the example you talk about, you did not use reCaptcha but Captcha GD. Captcha GD is a basic captcha system provide by the bundle, you cannot load a new image. reCaptcha allow the user to load a new image.

You can take a look at the reCaptcha integration provide by this bundle: https://github.com/genemu/GenemuFormBundle/blob/master/Resources/doc/recaptcha/index.md

Hi @WedgeSama I change from basic Captcha to reCaptcha and I followed all instructions on the page but captcha isn't showed on page when it renders, any advice? This the code related to Genemu on my config.yml:

#GenemuForm
genemu_form:
    recaptcha:
        public_key:  "%recaptcha_public_key%"
        private_key: "%recaptcha_private_key%"
    select2:
        enabled: true
        configs:
            placeholder: Seleccione ...
            width: off
            allowClear: false
            minimumInputLength: 3

And this are the keys (you can play with them I'll change later)

recaptcha_public_key: 6Le0gvgSAAAAAA9TcipaADEplRG2mU_dk4S8uiaz 
recaptcha_private_key: 6Le0gvgSAAAAAF2MMn7x9pubGlIjvWXEfzg-WH1E 

Any advice?

Have you add {{ form_javascript(form) }} to your template?

@WedgeSama I missed that part but I added now and get this error at console:

TypeError: Y.widget is null
.../g,e);Y._set_style(c);Y.update_widget();Y.widget.innerHTML='<div id="recaptcha_a...

You can take a live preview here pick Persona Natural as a choice in the main screen

I did not get the same error, i have this one The type name specified for the service "usuario.registration.form.type" does not match the actual name. Expected "sencamer_usuario", given "usuario". Have you correctly register your form type?

I'm getting a weird issue with a entity mapping and I'm trying to find where the error is, I'll ping you back in a few minutes when I get this error fixed

Try now, the problem is solved

On Wed, Aug 20, 2014 at 1:56 PM, Benjamin Georgeault <
notifications@github.com> wrote:

I did not get the same error, i have this one The type name specified for
the service "usuario.registration.form.type" does not match the actual
name. Expected "sencamer_usuario", given "usuario". Have you correctly
register your form type?


Reply to this email directly or view it on GitHub
#361 (comment)
.

I did not see the JS from {{ form_javascript(form) }}

I fixed that error take a look once again, now the error doesn't appear at
least to me but reCaptcha isn't showed

On Wed, Aug 20, 2014 at 5:17 PM, Benjamin Georgeault <
notifications@github.com> wrote:

I did not see the JS from {{ form_javascript(form) }}


Reply to this email directly or view it on GitHub
#361 (comment)
.

For some reason by including {{ form_javascript(form) }} break the rest
of the scripts on the site since it add a <noscript> tag to the code so
I'll disable for continue working and let me know when you can look to this
to enable again

On Wed, Aug 20, 2014 at 7:54 PM, reynierpm@gmail.com reynierpm@gmail.com
wrote:

I fixed that error take a look once again, now the error doesn't appear at
least to me but reCaptcha isn't showed

On Wed, Aug 20, 2014 at 5:17 PM, Benjamin Georgeault <
notifications@github.com> wrote:

I did not see the JS from {{ form_javascript(form) }}


Reply to this email directly or view it on GitHub
#361 (comment)
.

Did you use {{ form_javascript(form) }} on all pages? You have to call this function only if you have a form on the page, so in your case, just on register page.

This is exactly how I did, just in the register page

On Thu, Aug 21, 2014 at 2:53 AM, Benjamin Georgeault <
notifications@github.com> wrote:

Did you use {{ form_javascript(form) }} on all pages? You have to call
this function only if you have a form on the page, so in your case, just on
register page.


Reply to this email directly or view it on GitHub
#361 (comment)
.

Solution here #362