From 5618b937cf68101f45e1310b83279d0d91feb025 Mon Sep 17 00:00:00 2001 From: "lina.wolf" Date: Wed, 10 Jun 2026 14:26:11 +0200 Subject: [PATCH 1/3] [FEATURE] Hide FormEngine fields with no selectable items Resolves: https://github.com/TYPO3-Documentation/Changelog-To-Doc/issues/1672 Releases: main, 14.3 --- .../Category/_Properties/_ShowIfEmpty.rst.txt | 23 ++++++++++++ .../ColumnsConfig/Type/Language/Index.rst | 13 +++++++ .../CheckBox/_Properties/_ShowIfEmpty.rst.txt | 35 +++++++++++++++++++ .../_Properties/_ShowIfEmpty.rst.txt | 35 +++++++++++++++++++ .../Single/_Properties/_ShowIfEmpty.rst.txt | 35 +++++++++++++++++++ .../_Properties/_ShowIfEmpty.rst.txt | 35 +++++++++++++++++++ .../Tree/_Properties/_ShowIfEmpty.rst.txt | 35 +++++++++++++++++++ 7 files changed, 211 insertions(+) create mode 100644 Documentation/ColumnsConfig/Type/Category/_Properties/_ShowIfEmpty.rst.txt create mode 100644 Documentation/ColumnsConfig/Type/Select/CheckBox/_Properties/_ShowIfEmpty.rst.txt create mode 100644 Documentation/ColumnsConfig/Type/Select/MultipleSideBySide/_Properties/_ShowIfEmpty.rst.txt create mode 100644 Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ShowIfEmpty.rst.txt create mode 100644 Documentation/ColumnsConfig/Type/Select/SingleBox/_Properties/_ShowIfEmpty.rst.txt create mode 100644 Documentation/ColumnsConfig/Type/Select/Tree/_Properties/_ShowIfEmpty.rst.txt diff --git a/Documentation/ColumnsConfig/Type/Category/_Properties/_ShowIfEmpty.rst.txt b/Documentation/ColumnsConfig/Type/Category/_Properties/_ShowIfEmpty.rst.txt new file mode 100644 index 00000000..5c5d6a9d --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Category/_Properties/_ShowIfEmpty.rst.txt @@ -0,0 +1,23 @@ +.. confval:: showIfEmpty + :name: category-showIfEmpty + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']['showIfEmpty'] + :type: boolean + :Scope: Display + :Default: false + + .. versionchanged:: 14.2 + Starting with TYPO3 14.2 relational fields are hidden when no selectable + items are available. This option can be used to disable the behaviour. + + By default a field of type `category` is hidden when no categories are + available. Setting `showIfEmpty` to true, shows the field even if no options + are available. + + .. code-block:: php + :caption: EXT:my_extension/Configuration/TCA/Overrides/pages.php + + $GLOBALS['TCA']['pages']['columns']['categories']['config']['showIfEmpty'] = true; + + Possible reasons, why no categories are available: No category records + have been created yet, all categories have been deleted, or + the current user has no permissions for any of the existing categories. diff --git a/Documentation/ColumnsConfig/Type/Language/Index.rst b/Documentation/ColumnsConfig/Type/Language/Index.rst index 5386791c..fcf84bfa 100644 --- a/Documentation/ColumnsConfig/Type/Language/Index.rst +++ b/Documentation/ColumnsConfig/Type/Language/Index.rst @@ -61,6 +61,19 @@ types, except `pages`. In records on root level (`pid=0`) or on a page, outside of a site context, all languages from all site configurations are displayed in the new field. +.. versionchanged:: 14.2 + Fields of type `language` are now hidden by default if only one language is + available. + +Fields of type `language` are hidden by default if only one language is +available. They can be displayed nonetheless by setting +`showIfEmpty `_. + +Reasons why only one language is available include: + +* Only one language has been configured in the + + .. _columns-language-examples: .. _columns-language-simple-example: diff --git a/Documentation/ColumnsConfig/Type/Select/CheckBox/_Properties/_ShowIfEmpty.rst.txt b/Documentation/ColumnsConfig/Type/Select/CheckBox/_Properties/_ShowIfEmpty.rst.txt new file mode 100644 index 00000000..693b6e14 --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Select/CheckBox/_Properties/_ShowIfEmpty.rst.txt @@ -0,0 +1,35 @@ +.. confval:: showIfEmpty + :name: select-checkbox-showIfEmpty + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']['showIfEmpty'] + :type: boolean + :Scope: Display + :Default: false + + .. versionchanged:: 14.2 + Starting with TYPO3 14.2 relational fields are hidden when no selectable + items are available. This option can be used to disable the behaviour. + + By default a field of type `select` and any render type is hidden when no + select items are available. Setting `showIfEmpty` to true, shows the field + even if no options are available. + + .. code-block:: php + :caption: EXT:my_extension/Configuration/TCA/Overrides/pages.php + + $GLOBALS['TCA']['pages']['columns']['some_select_field']['config']['showIfEmpty'] = true; + + Possible reasons, why no select items are available: + + * `foreign_table `_ + was used and the referenced table has no records or none matching the + `foreign_table_where `_. + * `foreign_table `_ + was used and the currently logged in user has not permissions for the + referenced table or all of it records. + * All items have been hidden via page TSconfig, for example via + `removeItems `_ + or `keepItems `_ + is inproperly configured. + * The `itemsProcessors `_ + or `itemsProcFunc `_ + had no result. diff --git a/Documentation/ColumnsConfig/Type/Select/MultipleSideBySide/_Properties/_ShowIfEmpty.rst.txt b/Documentation/ColumnsConfig/Type/Select/MultipleSideBySide/_Properties/_ShowIfEmpty.rst.txt new file mode 100644 index 00000000..935b1eb1 --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Select/MultipleSideBySide/_Properties/_ShowIfEmpty.rst.txt @@ -0,0 +1,35 @@ +.. confval:: showIfEmpty + :name: select-byside-showIfEmpty + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']['showIfEmpty'] + :type: boolean + :Scope: Display + :Default: false + + .. versionchanged:: 14.2 + Starting with TYPO3 14.2 relational fields are hidden when no selectable + items are available. This option can be used to disable the behaviour. + + By default a field of type `select` and any render type is hidden when no + select items are available. Setting `showIfEmpty` to true, shows the field + even if no options are available. + + .. code-block:: php + :caption: EXT:my_extension/Configuration/TCA/Overrides/pages.php + + $GLOBALS['TCA']['pages']['columns']['some_select_field']['config']['showIfEmpty'] = true; + + Possible reasons, why no select items are available: + + * `foreign_table `_ + was used and the referenced table has no records or none matching the + `foreign_table_where `_. + * `foreign_table `_ + was used and the currently logged in user has not permissions for the + referenced table or all of it records. + * All items have been hidden via page TSconfig, for example via + `removeItems `_ + or `keepItems `_ + is inproperly configured. + * The `itemsProcessors `_ + or `itemsProcFunc `_ + had no result. diff --git a/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ShowIfEmpty.rst.txt b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ShowIfEmpty.rst.txt new file mode 100644 index 00000000..d022c6b9 --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ShowIfEmpty.rst.txt @@ -0,0 +1,35 @@ +.. confval:: showIfEmpty + :name: select-single-showIfEmpty + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']['showIfEmpty'] + :type: boolean + :Scope: Display + :Default: false + + .. versionchanged:: 14.2 + Starting with TYPO3 14.2 relational fields are hidden when no selectable + items are available. This option can be used to disable the behaviour. + + By default a field of type `select` and any render type is hidden when no + select items are available. Setting `showIfEmpty` to true, shows the field + even if no options are available. + + .. code-block:: php + :caption: EXT:my_extension/Configuration/TCA/Overrides/pages.php + + $GLOBALS['TCA']['pages']['columns']['some_select_field']['config']['showIfEmpty'] = true; + + Possible reasons, why no select items are available: + + * `foreign_table `_ + was used and the referenced table has no records or none matching the + `foreign_table_where `_. + * `foreign_table `_ + was used and the currently logged in user has not permissions for the + referenced table or all of it records. + * All items have been hidden via page TSconfig, for example via + `removeItems `_ + or `keepItems `_ + is inproperly configured. + * The `itemsProcessors `_ + or `itemsProcFunc `_ + had no result. diff --git a/Documentation/ColumnsConfig/Type/Select/SingleBox/_Properties/_ShowIfEmpty.rst.txt b/Documentation/ColumnsConfig/Type/Select/SingleBox/_Properties/_ShowIfEmpty.rst.txt new file mode 100644 index 00000000..2b1b19e0 --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Select/SingleBox/_Properties/_ShowIfEmpty.rst.txt @@ -0,0 +1,35 @@ +.. confval:: showIfEmpty + :name: select-singlebox-showIfEmpty + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']['showIfEmpty'] + :type: boolean + :Scope: Display + :Default: false + + .. versionchanged:: 14.2 + Starting with TYPO3 14.2 relational fields are hidden when no selectable + items are available. This option can be used to disable the behaviour. + + By default a field of type `select` and any render type is hidden when no + select items are available. Setting `showIfEmpty` to true, shows the field + even if no options are available. + + .. code-block:: php + :caption: EXT:my_extension/Configuration/TCA/Overrides/pages.php + + $GLOBALS['TCA']['pages']['columns']['some_select_field']['config']['showIfEmpty'] = true; + + Possible reasons, why no select items are available: + + * `foreign_table `_ + was used and the referenced table has no records or none matching the + `foreign_table_where `_. + * `foreign_table `_ + was used and the currently logged in user has not permissions for the + referenced table or all of it records. + * All items have been hidden via page TSconfig, for example via + `removeItems `_ + or `keepItems `_ + is inproperly configured. + * The `itemsProcessors `_ + or `itemsProcFunc `_ + had no result. diff --git a/Documentation/ColumnsConfig/Type/Select/Tree/_Properties/_ShowIfEmpty.rst.txt b/Documentation/ColumnsConfig/Type/Select/Tree/_Properties/_ShowIfEmpty.rst.txt new file mode 100644 index 00000000..f5567c08 --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Select/Tree/_Properties/_ShowIfEmpty.rst.txt @@ -0,0 +1,35 @@ +.. confval:: showIfEmpty + :name: select-tree-showIfEmpty + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']['showIfEmpty'] + :type: boolean + :Scope: Display + :Default: false + + .. versionchanged:: 14.2 + Starting with TYPO3 14.2 relational fields are hidden when no selectable + items are available. This option can be used to disable the behaviour. + + By default a field of type `select` and any render type is hidden when no + select items are available. Setting `showIfEmpty` to true, shows the field + even if no options are available. + + .. code-block:: php + :caption: EXT:my_extension/Configuration/TCA/Overrides/pages.php + + $GLOBALS['TCA']['pages']['columns']['some_select_field']['config']['showIfEmpty'] = true; + + Possible reasons, why no select items are available: + + * `foreign_table `_ + was used and the referenced table has no records or none matching the + `foreign_table_where `_. + * `foreign_table `_ + was used and the currently logged in user has not permissions for the + referenced table or all of it records. + * All items have been hidden via page TSconfig, for example via + `removeItems `_ + or `keepItems `_ + is inproperly configured. + * The `itemsProcessors `_ + or `itemsProcFunc `_ + had no result. From 9d8af25b14d99e6749865a897be2ff1233296083 Mon Sep 17 00:00:00 2001 From: Sarah McCarthy Date: Mon, 22 Jun 2026 12:02:50 +0200 Subject: [PATCH 2/3] [TASK] Language checks --- .../Category/_Properties/_ShowIfEmpty.rst.txt | 14 +++++------ .../ColumnsConfig/Type/Language/Index.rst | 6 ++--- .../Type/Select/CheckBox/Index.rst | 3 +++ .../CheckBox/_Properties/_ShowIfEmpty.rst.txt | 24 +++++++++---------- .../_Properties/_ShowIfEmpty.rst.txt | 22 ++++++++--------- .../Single/_Properties/_ShowIfEmpty.rst.txt | 24 +++++++++---------- 6 files changed, 48 insertions(+), 45 deletions(-) diff --git a/Documentation/ColumnsConfig/Type/Category/_Properties/_ShowIfEmpty.rst.txt b/Documentation/ColumnsConfig/Type/Category/_Properties/_ShowIfEmpty.rst.txt index 5c5d6a9d..85f74ae6 100644 --- a/Documentation/ColumnsConfig/Type/Category/_Properties/_ShowIfEmpty.rst.txt +++ b/Documentation/ColumnsConfig/Type/Category/_Properties/_ShowIfEmpty.rst.txt @@ -6,11 +6,11 @@ :Default: false .. versionchanged:: 14.2 - Starting with TYPO3 14.2 relational fields are hidden when no selectable - items are available. This option can be used to disable the behaviour. + Starting with TYPO3, 14.2 relational fields are hidden when no + selectable items are available. Option `showIfEmpty` will disable this behaviour. - By default a field of type `category` is hidden when no categories are - available. Setting `showIfEmpty` to true, shows the field even if no options + By default, `category` fields are hidden when no categories are + available. Setting `showIfEmpty` to true displays this field type, even if no options are available. .. code-block:: php @@ -18,6 +18,6 @@ $GLOBALS['TCA']['pages']['columns']['categories']['config']['showIfEmpty'] = true; - Possible reasons, why no categories are available: No category records - have been created yet, all categories have been deleted, or - the current user has no permissions for any of the existing categories. + Possible reasons why categories may not be available: no category records + have been created, all categories have been deleted, or + the current user has no permissions to access any of the categories. diff --git a/Documentation/ColumnsConfig/Type/Language/Index.rst b/Documentation/ColumnsConfig/Type/Language/Index.rst index fcf84bfa..df516901 100644 --- a/Documentation/ColumnsConfig/Type/Language/Index.rst +++ b/Documentation/ColumnsConfig/Type/Language/Index.rst @@ -65,13 +65,13 @@ all languages from all site configurations are displayed in the new field. Fields of type `language` are now hidden by default if only one language is available. -Fields of type `language` are hidden by default if only one language is -available. They can be displayed nonetheless by setting +`language` fields are hidden by default if only one language is +available. If they should be displayed, set `showIfEmpty `_. Reasons why only one language is available include: -* Only one language has been configured in the +* Only one language has been configured in :doc:`Site Management ` .. _columns-language-examples: diff --git a/Documentation/ColumnsConfig/Type/Select/CheckBox/Index.rst b/Documentation/ColumnsConfig/Type/Select/CheckBox/Index.rst index a52c385a..9f1a5e01 100644 --- a/Documentation/ColumnsConfig/Type/Select/CheckBox/Index.rst +++ b/Documentation/ColumnsConfig/Type/Select/CheckBox/Index.rst @@ -124,3 +124,6 @@ Properties of the TCA column type `select` with renderType `selectCheckBox` .. include:: _Properties/_ReadOnly.rst.txt :show-buttons: + + .. include:: _Properties/_ShowIfEmpty.rst.txt + :show-buttons: diff --git a/Documentation/ColumnsConfig/Type/Select/CheckBox/_Properties/_ShowIfEmpty.rst.txt b/Documentation/ColumnsConfig/Type/Select/CheckBox/_Properties/_ShowIfEmpty.rst.txt index 693b6e14..e1071a00 100644 --- a/Documentation/ColumnsConfig/Type/Select/CheckBox/_Properties/_ShowIfEmpty.rst.txt +++ b/Documentation/ColumnsConfig/Type/Select/CheckBox/_Properties/_ShowIfEmpty.rst.txt @@ -6,11 +6,11 @@ :Default: false .. versionchanged:: 14.2 - Starting with TYPO3 14.2 relational fields are hidden when no selectable - items are available. This option can be used to disable the behaviour. + Starting with TYPO3 14.2, relational fields are hidden when no selectable + items are available. Option `showIfEmpty` will disable this behaviour. - By default a field of type `select` and any render type is hidden when no - select items are available. Setting `showIfEmpty` to true, shows the field + By default, `select` fields and any render types are hidden when no + select items are available. Setting `showIfEmpty` to true displays the field even if no options are available. .. code-block:: php @@ -18,18 +18,18 @@ $GLOBALS['TCA']['pages']['columns']['some_select_field']['config']['showIfEmpty'] = true; - Possible reasons, why no select items are available: + Possible reasons why no select items are available: - * `foreign_table `_ - was used and the referenced table has no records or none matching the + * a `foreign_table `_ + is used and the referenced table has no records or none matching the `foreign_table_where `_. - * `foreign_table `_ - was used and the currently logged in user has not permissions for the - referenced table or all of it records. - * All items have been hidden via page TSconfig, for example via + * a `foreign_table `_ + is used and the currently logged in user has no permissions for the + referenced table or its records. + * All items have been hidden via page TSconfig, for example, `removeItems `_ or `keepItems `_ - is inproperly configured. + are inproperly configured. * The `itemsProcessors `_ or `itemsProcFunc `_ had no result. diff --git a/Documentation/ColumnsConfig/Type/Select/MultipleSideBySide/_Properties/_ShowIfEmpty.rst.txt b/Documentation/ColumnsConfig/Type/Select/MultipleSideBySide/_Properties/_ShowIfEmpty.rst.txt index 935b1eb1..82b44015 100644 --- a/Documentation/ColumnsConfig/Type/Select/MultipleSideBySide/_Properties/_ShowIfEmpty.rst.txt +++ b/Documentation/ColumnsConfig/Type/Select/MultipleSideBySide/_Properties/_ShowIfEmpty.rst.txt @@ -6,11 +6,11 @@ :Default: false .. versionchanged:: 14.2 - Starting with TYPO3 14.2 relational fields are hidden when no selectable - items are available. This option can be used to disable the behaviour. + Starting with TYPO3 14.2, relational fields are hidden when no selectable + items are available. Option `showIfEmpty` will disable this behaviour. - By default a field of type `select` and any render type is hidden when no - select items are available. Setting `showIfEmpty` to true, shows the field + By default, `select` fields and any render types are hidden when no + select items are available. Setting `showIfEmpty` to true displays the field even if no options are available. .. code-block:: php @@ -18,18 +18,18 @@ $GLOBALS['TCA']['pages']['columns']['some_select_field']['config']['showIfEmpty'] = true; - Possible reasons, why no select items are available: + Possible reasons why no select items are available: - * `foreign_table `_ - was used and the referenced table has no records or none matching the + * a `foreign_table `_ + is used and the referenced table has no records or none matching the `foreign_table_where `_. - * `foreign_table `_ - was used and the currently logged in user has not permissions for the + * a `foreign_table `_ + is used and the currently logged in user has no permissions for the referenced table or all of it records. - * All items have been hidden via page TSconfig, for example via + * All items have been hidden via page TSconfig, for example, `removeItems `_ or `keepItems `_ - is inproperly configured. + are inproperly configured. * The `itemsProcessors `_ or `itemsProcFunc `_ had no result. diff --git a/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ShowIfEmpty.rst.txt b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ShowIfEmpty.rst.txt index d022c6b9..c1c4e9e2 100644 --- a/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ShowIfEmpty.rst.txt +++ b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ShowIfEmpty.rst.txt @@ -6,11 +6,11 @@ :Default: false .. versionchanged:: 14.2 - Starting with TYPO3 14.2 relational fields are hidden when no selectable - items are available. This option can be used to disable the behaviour. + Starting with TYPO3 14.2, relational fields are hidden when no selectable + items are available. Option `showIfEmpty` will disable this behaviour. - By default a field of type `select` and any render type is hidden when no - select items are available. Setting `showIfEmpty` to true, shows the field + By default, `select` fields and any render types are hidden when no + select items are available. Setting `showIfEmpty` to true displays the field even if no options are available. .. code-block:: php @@ -18,18 +18,18 @@ $GLOBALS['TCA']['pages']['columns']['some_select_field']['config']['showIfEmpty'] = true; - Possible reasons, why no select items are available: + Possible reasons why no select items are available: - * `foreign_table `_ - was used and the referenced table has no records or none matching the + * a `foreign_table `_ + is used and the referenced table has no records or none matching the `foreign_table_where `_. - * `foreign_table `_ - was used and the currently logged in user has not permissions for the - referenced table or all of it records. - * All items have been hidden via page TSconfig, for example via + * a `foreign_table `_ + is used and the currently logged in user has no permissions for the + referenced table or its records. + * All items have been hidden via page TSconfig, for example, `removeItems `_ or `keepItems `_ - is inproperly configured. + are inproperly configured. * The `itemsProcessors `_ or `itemsProcFunc `_ had no result. From e56cfc718c60c73080e30428a25e04ad282c7997 Mon Sep 17 00:00:00 2001 From: Sarah McCarthy Date: Mon, 22 Jun 2026 12:06:42 +0200 Subject: [PATCH 3/3] [TASK] Language checks --- .../Tree/_Properties/_ShowIfEmpty.rst.txt | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Documentation/ColumnsConfig/Type/Select/Tree/_Properties/_ShowIfEmpty.rst.txt b/Documentation/ColumnsConfig/Type/Select/Tree/_Properties/_ShowIfEmpty.rst.txt index f5567c08..f106b248 100644 --- a/Documentation/ColumnsConfig/Type/Select/Tree/_Properties/_ShowIfEmpty.rst.txt +++ b/Documentation/ColumnsConfig/Type/Select/Tree/_Properties/_ShowIfEmpty.rst.txt @@ -6,11 +6,11 @@ :Default: false .. versionchanged:: 14.2 - Starting with TYPO3 14.2 relational fields are hidden when no selectable - items are available. This option can be used to disable the behaviour. + Starting with TYPO3 14.2, relational fields are hidden when no selectable + items are available. Option `showIfEmpty` will disable this behaviour. - By default a field of type `select` and any render type is hidden when no - select items are available. Setting `showIfEmpty` to true, shows the field + By default, `select` fields and any render types are hidden when no + select items are available. Setting `showIfEmpty` to true displays the field even if no options are available. .. code-block:: php @@ -18,18 +18,18 @@ $GLOBALS['TCA']['pages']['columns']['some_select_field']['config']['showIfEmpty'] = true; - Possible reasons, why no select items are available: + Possible reasons why no select items are available: - * `foreign_table `_ - was used and the referenced table has no records or none matching the + * a `foreign_table `_ + is used and the referenced table has no records or none matching the `foreign_table_where `_. - * `foreign_table `_ - was used and the currently logged in user has not permissions for the - referenced table or all of it records. - * All items have been hidden via page TSconfig, for example via + * a `foreign_table `_ + is used and the currently logged in user has no permissions for the + referenced table or its records. + * All items have been hidden via page TSconfig, for example, `removeItems `_ or `keepItems `_ - is inproperly configured. + are inproperly configured. * The `itemsProcessors `_ or `itemsProcFunc `_ had no result.