diff --git a/reference/forms/twig_reference.rst b/reference/forms/twig_reference.rst index e33b6b5f1c0..06654a89916 100644 --- a/reference/forms/twig_reference.rst +++ b/reference/forms/twig_reference.rst @@ -192,6 +192,24 @@ good idea to include this in your form tag:
+Form Tests Reference +-------------------- + +Tests can be executed by using the ``is`` operator in Twig to create a +condition. Read `the Twig documentation`_ for more information. + +.. _form-twig-selectedchoice: + +selectedchoice(selected_value) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This test will check if the current choice is equal to the ``selected_value`` +or if the current choice is in the array (when ``selected_value`` is an array). + +.. code-block:: jinja + +