excelwebzone / EWZRecaptchaBundle

This bundle provides easy reCAPTCHA form field for Symfony.
MIT License
396 stars 160 forks source link

On click button onReCaptchaSuccess is fired only first ime, the next clicks onReCaptchaSuccess is not fired #228

Open ahmed-bhs opened 5 years ago

ahmed-bhs commented 5 years ago

This my current code :

            ->add('recaptcha', EWZRecaptchaType::class, array(
                'mapped' => false,
                'attr' => array(
                    'options' => array(
                        'theme' => 'light',
                        'type'  => 'image',
                        'size' => 'invisible',              // set size to invisible
                        'defer' => true,
                        'async' => true,
                        'callback' => 'onReCaptchaSuccess', // callback will be set by default if not defined (along with JS function that validate the form on success)
                        'bind' => 'btn_submit',             // this is the id of the form submit button
                        // ...
                    )
                )
            ));

The problem that my js callback function is fired only the first time.