I’m currently using Silex for a small project. I’ve registered the form service that way:
$app->register(new Silex\Provider\FormServiceProvider(), array(
'form.class_path' => __DIR__ . '/../vendor/symfony/src',
));
And create a form using $form = $app['form.factory']->createBuilder('form');
I need to embed a form in an html email, but the CSRF protection don’t allow me to directly answer the form inside the email.
How to disable the protection, for this particular form or for all the others (I know how to do it in Symfony2 but not in Silex..)
Thanks a lot for your answers!
I found the answer thaks to @lyrixx on Twitter. Simply do:
And it just perfectly works 😉