whatson-web / recaptcha-bundle
Symfony - Whatson Web - RecaptchaBundle
Package info
github.com/whatson-web/RecaptchaBundle
Type:symfony-bundle
pkg:composer/whatson-web/recaptcha-bundle
dev-master
2018-10-03 08:18 UTC
This package is not auto-updated.
Last update: 2026-03-16 06:01:57 UTC
README
Bundle
JS
Insérez la librairie Google avec la balise :
<script src='https://www.google.com/recaptcha/api.js'></script>
Config
wh_recaptcha:
public_key: ''
private_key: ''
Mise en place sur un formulaire
FormType
Ajouter un champ dans le formulaire, ex :
->add(
'recaptcha',
RecaptchaType::class
)
Thème
Appliquer le thème au formulaire :
{% form_theme form with ['my_base.html.twig', 'WHRecaptchaBundle:Form:fields.html.twig'] %}