From 4a9f8ae2e56515bf14c023fae31b04531fa914e1 Mon Sep 17 00:00:00 2001 From: kenjis Date: Tue, 17 Jan 2023 12:17:55 +0900 Subject: [PATCH 1/4] docs: remove text decoration --- user_guide_src/source/helpers/form_helper.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/helpers/form_helper.rst b/user_guide_src/source/helpers/form_helper.rst index 0b05d49f2ae6..6faa454252e3 100644 --- a/user_guide_src/source/helpers/form_helper.rst +++ b/user_guide_src/source/helpers/form_helper.rst @@ -12,7 +12,7 @@ forms. 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 =================== From 3f5d81cd91db543e0179a5dcb73bc0635c17251a Mon Sep 17 00:00:00 2001 From: kenjis Date: Tue, 17 Jan 2023 12:18:22 +0900 Subject: [PATCH 2/4] docs: fix XHTML void element tags --- user_guide_src/source/helpers/form_helper.rst | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/user_guide_src/source/helpers/form_helper.rst b/user_guide_src/source/helpers/form_helper.rst index 6faa454252e3..470b5df45f6f 100644 --- a/user_guide_src/source/helpers/form_helper.rst +++ b/user_guide_src/source/helpers/form_helper.rst @@ -37,7 +37,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, @@ -106,7 +106,7 @@ The following functions are available: will return::
- + .. note:: To use auto-generation of CSRF field, you need to turn CSRF filter on to the form page. In most cases it is requested using the ``GET`` method. @@ -122,8 +122,8 @@ The following functions are available: The above example would create a form similar to this:: - - + + .. php:function:: form_open_multipart([$action = ''[, $attributes = ''[, $hidden = []]]]) @@ -457,7 +457,7 @@ The following functions are available: Example:: - + The above form will show "0" when loaded for the first time. @@ -500,8 +500,8 @@ The following functions are available: Example:: - /> - /> + > + > .. php:function:: set_radio($field[, $value = ''[, $default = false]]) @@ -516,8 +516,8 @@ The following functions are available: Example:: - /> - /> + > + > .. php:function:: validation_errors() From 278f75e83691326b052a3c3420ead729f850d4da Mon Sep 17 00:00:00 2001 From: kenjis Date: Tue, 17 Jan 2023 13:06:16 +0900 Subject: [PATCH 3/4] docs: fix section level --- user_guide_src/source/helpers/form_helper.rst | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/user_guide_src/source/helpers/form_helper.rst b/user_guide_src/source/helpers/form_helper.rst index 470b5df45f6f..7f1d777850fe 100644 --- a/user_guide_src/source/helpers/form_helper.rst +++ b/user_guide_src/source/helpers/form_helper.rst @@ -9,20 +9,23 @@ 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``. +******************* 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 @@ -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: From 3d19080354da07db7f996a867fa7834e1fd650f0 Mon Sep 17 00:00:00 2001 From: kenjis Date: Tue, 17 Jan 2023 13:17:14 +0900 Subject: [PATCH 4/4] docs: add links --- user_guide_src/source/helpers/form_helper.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user_guide_src/source/helpers/form_helper.rst b/user_guide_src/source/helpers/form_helper.rst index 7f1d777850fe..cb60013843cc 100644 --- a/user_guide_src/source/helpers/form_helper.rst +++ b/user_guide_src/source/helpers/form_helper.rst @@ -30,7 +30,7 @@ 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: @@ -103,7 +103,7 @@ The following functions are available: - If CSRF filter is turned on ``form_open()`` will generate CSRF field at the beginning of the form. You can specify ID of this field by passing csrf_id as one of the ``$attribute`` array: + If :ref:`CSRF ` filter is turned on ``form_open()`` will generate CSRF field at the beginning of the form. You can specify ID of this field by passing csrf_id as one of the ``$attribute`` array: .. literalinclude:: form_helper/007.php