From 75971005b4b4853e63fb5e288a8311a26cfb2e6e Mon Sep 17 00:00:00 2001 From: "hubert.lenoir" Date: Mon, 23 May 2022 15:40:19 +0200 Subject: [PATCH] [Form][Security] Configure field_name under framework.form --- reference/configuration/framework.rst | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index 9351742f3f2..d15bac0ba03 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -335,6 +335,15 @@ settings is configured. For more details, see :doc:`/forms`. +.. _reference-form-field-name: + +field_name +.......... + +**type**: ``string`` **default**: ``_token`` + +This is the field name that you should give to the CSRF token field of your forms. + .. _reference-framework-csrf-protection: csrf_protection @@ -357,14 +366,14 @@ can also :ref:`disable CSRF protection on individual forms - + .. code-block:: php - + // config/packages/framework.php use Symfony\Config\FrameworkConfig; return static function (FrameworkConfig $framework) {