We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i follow the docs
my ewz_recaptcha.yaml :
# See https://github.com/excelwebzone/EWZRecaptchaBundle for full configuration ewz_recaptcha: public_key: '%env(EWZ_RECAPTCHA_SITE_KEY)%' private_key: '%env(EWZ_RECAPTCHA_SECRET)%' version: 2 enabled: true api_host: recaptcha.net verify_host: true
My form :
<?php declare(strict_types=1); namespace App\Form\Extension; use App\Form\FormHelper; use Sylius\Bundle\CustomerBundle\Form\Type\CustomerProfileType; use Symfony\Component\Form\AbstractTypeExtension; use Symfony\Component\Form\Extension\Core\Type\CheckboxType; use Symfony\Component\Form\Extension\Core\Type\TelType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Validator\Constraints\NotBlank; use EWZ\Bundle\RecaptchaBundle\Form\Type\EWZRecaptchaType; class BaseCustomerTypeExtension extends AbstractTypeExtension { public function buildForm(FormBuilderInterface $builder, array $options): void { $builder ->remove('gender') ->add('phoneNumber', TelType::class, [ 'label' => 'app.form.phone', 'constraints' => $this->getPhoneNumberConstraints(), ]) ->add('isAgreeToReceiveByMail', CheckboxType::class, [ 'label' => 'app.form.mail', ]) ->add('isAgreeToReceiveBySms', CheckboxType::class, [ 'label' => 'app.form.sms', ]) ->add('isAgreeToReceiveByCourier', CheckboxType::class, [ 'label' => 'app.form.courier', ]) ->add('recaptcha', EWZRecaptchaType::class, array( 'attr' => array( 'options' => array( 'theme' => 'light', 'type' => 'image', 'size' => 'normal', 'defer' => true, 'async' => true, ) ) )) ; } public static function getExtendedTypes(): iterable { return [CustomerProfileType::class]; } private function getPhoneNumberConstraints(): array { return [ new NotBlank(FormHelper::getDefaultSyliusValidationGroup()), ]; } }
added on the twig :
{{ form_row(form.recaptcha) }}
Error =>
if you have an idea, i try too for version 3 but the problem is same with an other option
The text was updated successfully, but these errors were encountered:
No branches or pull requests
i follow the docs
my ewz_recaptcha.yaml :
My form :
added on the twig :
Error =>
if you have an idea, i try too for version 3 but the problem is same with an other option
The text was updated successfully, but these errors were encountered: