EWZRecaptchaBundle
EWZRecaptchaBundle copied to clipboard
This form should not contain extra fields.

Can you provide your FormType and/or the steps to reproduce ?
I have it here.
@pinodex this might not be related to this, try to debug your code and identify the "extra" field.. you can var_dump the $form->getErrors() to see (https://github.com/symfony/Form/blob/master/Form.php)
How to reproduce the bug:
- Create form type with empty name:
public function getName()
{
return '';
}
- The form types will be added to form without array syntax. e.g
username, noruser['username'].
recaptcha creates new field g-recaptcha-response that will be sended with the response and tha's the extra field that Symfony form detects.
So this bug occurs if you need to have clean names for your inputs.
+1 on this issue, any update ?
I don't believe this bundle is maintained anymore.
Workaround: Form field name to match hardcoded injected field
$builder->add('g-recaptcha-response', EWZRecaptchaType::class, [
'constraints' => [ new RecaptchaTrue() ],
]);