Hi,
When I display an error of a certain form field, I do sth like this $form['field_name']->error because I don't like displaying all errors at the top of the form as a list. So, I also want to display the error only for invisible recaptcha field. The error message is in global form errors array $form->errors but the array of errors for specific recaptcha field $form['recaptcha']->errors is empty. After debugging I know it is because InvisibleReCaptchaField extends for HiddenField.
Is there a way to get the error just for recaptcha?
Hi, When I display an error of a certain form field, I do sth like this
$form['field_name']->error
because I don't like displaying all errors at the top of the form as a list. So, I also want to display the error only for invisible recaptcha field. The error message is in global form errors array$form->errors
but the array of errors for specific recaptcha field$form['recaptcha']->errors
is empty. After debugging I know it is becauseInvisibleReCaptchaField
extends for HiddenField. Is there a way to get the error just for recaptcha?