diff --git a/user_guide_src/source/helpers/form_helper.rst b/user_guide_src/source/helpers/form_helper.rst index 0b05d49f2ae6..cb60013843cc 100644 --- a/user_guide_src/source/helpers/form_helper.rst +++ b/user_guide_src/source/helpers/form_helper.rst @@ -9,25 +9,28 @@ forms. :local: :depth: 2 +************* Configuration -============= +************* -Since ``v4.3.0``, void HTML elements (e.g. ````) in ``form_helper`` functions have been changed to be HTML5-compatible by default and if you need to be compatible with XHTML, you must set the ``$html5`` property in **app/Config/DocTypes.php** to ``false``. +Since v4.3.0, void HTML elements (e.g. ````) in ``form_helper`` functions have been changed to be HTML5-compatible by default and if you need to be compatible with XHTML, you must set the ``$html5`` property in **app/Config/DocTypes.php** to ``false``. +******************* Loading this Helper -=================== +******************* This helper is loaded using the following code: .. literalinclude:: form_helper/001.php -Escaping field values -===================== +********************* +Escaping Field Values +********************* You may need to use HTML and characters such as quotes within your form elements. In order to do that safely, you'll need to use :doc:`common function <../general/common_functions>` -:func:`esc()`. +:php:func:`esc()`. Consider the following example: @@ -37,7 +40,7 @@ Since the above string contains a set of quotes, it will cause the form to break. The :php:func:`esc()` function converts HTML special characters so that it can be used safely:: - + .. note:: If you use any of the form helper functions listed on this page, and you pass values as an associative array, @@ -45,8 +48,9 @@ characters so that it can be used safely:: to call this function. Use it only if you are creating your own form elements, which you would pass as strings. +******************* Available Functions -=================== +******************* The following functions are available: @@ -99,14 +103,14 @@ The following functions are available: