diff --git a/Documentation/ColumnsConfig/Type/Check/Default.rst b/Documentation/ColumnsConfig/Type/Check/Default.rst index c27f5c24..00e3234a 100644 --- a/Documentation/ColumnsConfig/Type/Check/Default.rst +++ b/Documentation/ColumnsConfig/Type/Check/Default.rst @@ -1,8 +1,8 @@ -.. include:: /Includes.rst.txt +.. include:: /Includes.rst.txt -.. _columns-check-properties: -.. _columns-check-properties-type: -.. _columns-check-default: +.. _columns-check-properties: +.. _columns-check-properties-type: +.. _columns-check-default: ================ Default checkbox @@ -13,9 +13,9 @@ is typically a single checkbox or a group of checkboxes. Its state can be inverted via :php:`invertStateDisplay`. -.. _columns-check-examples: -.. _columns-check-examples-single: -.. _columns-check-examples-array: +.. _columns-check-examples: +.. _columns-check-examples-single: +.. _columns-check-examples-array: Examples -------- @@ -23,45 +23,45 @@ Examples All examples listed here can be found in the :ref:`extension styleguide `. -.. _tca_example_checkbox_2: +.. _tca_example_checkbox_2: Example: Simple checkbox with label ----------------------------------- -.. include:: /Images/Rst/Checkbox2.rst.txt +.. include:: /Images/Rst/Checkbox2.rst.txt TCA: -.. include:: /CodeSnippets/Checkbox2.rst.txt +.. include:: /CodeSnippets/Checkbox2.rst.txt If the checkbox is checked, the value for the field will be 1, if unchecked, it will be 0. :ref:`FlexForm `: -.. include:: /CodeSnippets/Manual/FlexformCheckbox2.rst.txt +.. include:: /CodeSnippets/Manual/FlexformCheckbox2.rst.txt -.. _tca_example_checkbox_12: +.. _tca_example_checkbox_12: Example: Four checkboxes in three columns ----------------------------------------- -.. include:: /Images/Rst/Checkbox12.rst.txt +.. include:: /Images/Rst/Checkbox12.rst.txt TCA: -.. include:: /CodeSnippets/Checkbox12.rst.txt +.. include:: /CodeSnippets/Checkbox12.rst.txt If all checkboxes are checked, the value for the field will be 15 (:php:`1 | 2 | 4 | 8`). -.. _tca_example_checkbox_16: +.. _tca_example_checkbox_16: Example: Checkboxes with inline floating ---------------------------------------- -.. include:: /Images/Rst/Checkbox16.rst.txt -.. include:: /CodeSnippets/Checkbox16.rst.txt +.. include:: /Images/Rst/Checkbox16.rst.txt +.. include:: /CodeSnippets/Checkbox16.rst.txt This will display as many checkbox items as will fit in one row. Without inline, each checkbox would be displayed in a separate row. diff --git a/Documentation/ColumnsConfig/Type/Check/Index.rst b/Documentation/ColumnsConfig/Type/Check/Index.rst index f5d4b608..9b2ebbdc 100644 --- a/Documentation/ColumnsConfig/Type/Check/Index.rst +++ b/Documentation/ColumnsConfig/Type/Check/Index.rst @@ -1,6 +1,6 @@ -.. include:: /Includes.rst.txt +.. include:: /Includes.rst.txt -.. _columns-check: +.. _columns-check: ========== Checkboxes @@ -21,7 +21,7 @@ This type creates checkbox(es). There can be between 1 and 31 checkboxes. The corresponding database field must be of type integer. Each checkbox corresponds to a single bit of the integer value, even if there is only one checkbox. -.. tip:: +.. tip:: This means that you should check the bits of values from single-checkbox fields and not just whether it is true or false. @@ -31,30 +31,30 @@ fields with the render type details please see: :ref:`selectCheckBox-check-compared`. -.. include:: /Images/Rst/Checkbox2.rst.txt -.. include:: /Images/Rst/Checkbox16.rst.txt -.. include:: /Images/Rst/Checkbox19.rst.txt -.. include:: /Images/Rst/Checkbox17.rst.txt +.. include:: /Images/Rst/Checkbox2.rst.txt +.. include:: /Images/Rst/Checkbox16.rst.txt +.. include:: /Images/Rst/Checkbox19.rst.txt +.. include:: /Images/Rst/Checkbox17.rst.txt -.. _columns-check-introduction: +.. _columns-check-introduction: -.. warning:: +.. warning:: Resorting the 'items' of a type='check' config results in single items moving to different bit positions. It might be required to migrate existing field data if doing so. The following renderTypes are available: -* :ref:`default `: One or more checkboxes are displayed. -* :ref:`checkboxToggle `: Instead of checkboxes, - a toggle item is displayed. -* :ref:`checkboxLabeledToggle `: A toggle - switch where both states can be labelled (ON/OFF, Visible / Hidden or alike). - Its state can be inverted via :code:`invertStateDisplay` +* :ref:`default `: One or more checkboxes are displayed. +* :ref:`checkboxToggle `: Instead of checkboxes, + a toggle item is displayed. +* :ref:`checkboxLabeledToggle `: A toggle + switch where both states can be labelled (ON/OFF, Visible / Hidden or alike). + Its state can be inverted via :code:`invertStateDisplay` -.. toctree:: - :hidden: +.. toctree:: + :hidden: - Default - Toggle - LabeledToggle - Properties/Index + Default + Toggle + LabeledToggle + Properties/Index diff --git a/Documentation/ColumnsConfig/Type/Check/LabeledToggle.rst b/Documentation/ColumnsConfig/Type/Check/LabeledToggle.rst index bf8b5298..40873c29 100644 --- a/Documentation/ColumnsConfig/Type/Check/LabeledToggle.rst +++ b/Documentation/ColumnsConfig/Type/Check/LabeledToggle.rst @@ -1,6 +1,6 @@ -.. include:: /Includes.rst.txt +.. include:: /Includes.rst.txt -.. _columns-check-checkboxLabeledToggle: +.. _columns-check-checkboxLabeledToggle: ======================= Labeled toggle checkbox @@ -18,24 +18,24 @@ Its state can be inverted via :ref:`invertStateDisplay Examples ======== -.. _tca_example_checkbox_19: +.. _tca_example_checkbox_19: Single checkbox with labeled toggle ----------------------------------- -.. include:: /Images/Rst/Checkbox19.rst.txt +.. include:: /Images/Rst/Checkbox19.rst.txt -.. include:: /CodeSnippets/Checkbox19.rst.txt +.. include:: /CodeSnippets/Checkbox19.rst.txt -.. _tca_example_checkbox_21: +.. _tca_example_checkbox_21: Single checkbox with labeled toggle inverted state display ---------------------------------------------------------- -.. include:: /Images/Rst/Checkbox21.rst.txt +.. include:: /Images/Rst/Checkbox21.rst.txt -.. include:: /CodeSnippets/Checkbox21.rst.txt +.. include:: /CodeSnippets/Checkbox21.rst.txt diff --git a/Documentation/ColumnsConfig/Type/Check/Properties/Cols.rst b/Documentation/ColumnsConfig/Type/Check/Properties/Cols.rst index 5fa33cce..9bee1ef5 100644 --- a/Documentation/ColumnsConfig/Type/Check/Properties/Cols.rst +++ b/Documentation/ColumnsConfig/Type/Check/Properties/Cols.rst @@ -1,23 +1,23 @@ -.. include:: /Includes.rst.txt -.. _columns-check-properties-cols: +.. include:: /Includes.rst.txt +.. _columns-check-properties-cols: ==== cols ==== -.. confval:: cols +.. confval:: cols + :name: check-cols + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] + :type: integer/string + :Scope: Display - :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] - :type: integer/string - :Scope: Display + In how many columns the checkboxes will be shown. Makes sense only if the 'items' property is defining multiple + checkboxes. - In how many columns the checkboxes will be shown. Makes sense only if the 'items' property is defining multiple - checkboxes. + Allowed values are 1, 2, 3, ..., 31 or `inline`, 1 being default. If set to `inline` the checkboxes are + "floating" and there will be as many in one row as fits to browser width. - Allowed values are 1, 2, 3, ..., 31 or `inline`, 1 being default. If set to `inline` the checkboxes are - "floating" and there will be as many in one row as fits to browser width. - - Note checkboxes will still wrap if browser width is not sufficient. + Note checkboxes will still wrap if browser width is not sufficient. Examples ======== @@ -25,11 +25,11 @@ Examples Fixes columns ------------- -.. include:: /Images/Rst/Checkbox2.rst.txt -.. include:: /CodeSnippets/Checkbox2.rst.txt +.. include:: /Images/Rst/Checkbox2.rst.txt +.. include:: /CodeSnippets/Checkbox2.rst.txt Inline columns -------------- -.. include:: /Images/Rst/Checkbox16.rst.txt -.. include:: /CodeSnippets/Checkbox16.rst.txt +.. include:: /Images/Rst/Checkbox16.rst.txt +.. include:: /CodeSnippets/Checkbox16.rst.txt diff --git a/Documentation/ColumnsConfig/Type/Check/Properties/Default.rst b/Documentation/ColumnsConfig/Type/Check/Properties/Default.rst index 7cbdc169..51fc3c1b 100644 --- a/Documentation/ColumnsConfig/Type/Check/Properties/Default.rst +++ b/Documentation/ColumnsConfig/Type/Check/Properties/Default.rst @@ -1,42 +1,42 @@ -.. include:: /Includes.rst.txt -.. _columns-check-properties-default: +.. include:: /Includes.rst.txt +.. _columns-check-properties-default: ======= default ======= -.. confval:: default (type => check) - - :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] - :type: integer - :Scope: Display / Proc. - - The default value of the checkbox(es). - - Each bit of the decimal value corresponds to a checkbox. As an example, the - value `5` enables the first and third checkbox. - - This is true even if there is only one checkbox, which then maps to the first - bit (reading from right to left). - - +---------------+-----------------------+---------------------+ - | decimal value | binary representation | selected checkboxes | - +===============+=======================+=====================+ - | 0 | 0000 0000 | none | - +---------------+-----------------------+---------------------+ - | 1 | 0000 0001 | first | - +---------------+-----------------------+---------------------+ - | 2 | 0000 0010 | second | - +---------------+-----------------------+---------------------+ - | 5 | 0000 0101 | first, third | - +---------------+-----------------------+---------------------+ - | 127 | 0111 1111 | the first seven | - +---------------+-----------------------+---------------------+ - - To find out the right default decimal value, first start off by writing down - the binary representation and set the desired bits at the appropriate - position to 1. Then convert the binary number to decimal. You can either use - a calculator with programmer mode or search online for "binary to decimal". +.. confval:: default + :name: check-default + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] + :type: integer + :Scope: Display / Proc. + + The default value of the checkbox(es). + + Each bit of the decimal value corresponds to a checkbox. As an example, the + value `5` enables the first and third checkbox. + + This is true even if there is only one checkbox, which then maps to the first + bit (reading from right to left). + + +---------------+-----------------------+---------------------+ + | decimal value | binary representation | selected checkboxes | + +===============+=======================+=====================+ + | 0 | 0000 0000 | none | + +---------------+-----------------------+---------------------+ + | 1 | 0000 0001 | first | + +---------------+-----------------------+---------------------+ + | 2 | 0000 0010 | second | + +---------------+-----------------------+---------------------+ + | 5 | 0000 0101 | first, third | + +---------------+-----------------------+---------------------+ + | 127 | 0111 1111 | the first seven | + +---------------+-----------------------+---------------------+ + + To find out the right default decimal value, first start off by writing down + the binary representation and set the desired bits at the appropriate + position to 1. Then convert the binary number to decimal. You can either use + a calculator with programmer mode or search online for "binary to decimal". Examples ======== @@ -44,8 +44,8 @@ Examples Multiple checkboxes with a default value ---------------------------------------- -.. include:: /Images/Rst/Checkbox16.rst.txt +.. include:: /Images/Rst/Checkbox16.rst.txt Here "Tu", the second bit, is active by default. -.. include:: /CodeSnippets/Manual/CheckboxDefault.rst.txt +.. include:: /CodeSnippets/Manual/CheckboxDefault.rst.txt diff --git a/Documentation/ColumnsConfig/Type/Check/Properties/Eval.rst b/Documentation/ColumnsConfig/Type/Check/Properties/Eval.rst index c8ac661c..114883b7 100644 --- a/Documentation/ColumnsConfig/Type/Check/Properties/Eval.rst +++ b/Documentation/ColumnsConfig/Type/Check/Properties/Eval.rst @@ -1,34 +1,34 @@ -.. include:: /Includes.rst.txt -.. _columns-check-properties-eval: +.. include:: /Includes.rst.txt +.. _columns-check-properties-eval: ==== eval ==== -.. confval:: eval (type => check) +.. confval:: eval + :name: check-eval + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] + :type: string (list of keywords) + :Scope: Proc. / Display - :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] - :type: string (list of keywords) - :Scope: Proc. / Display + Configuration of field evaluation. - Configuration of field evaluation. + Keywords: - Keywords: + maximumRecordsChecked + If this evaluation is defined, the maximum number of records from the same table that can have this box + checked will be limited. If someone tries to check the box of a record beyond the allowed maximum, the + box will be unchecked automatically upon saving. - maximumRecordsChecked - If this evaluation is defined, the maximum number of records from the same table that can have this box - checked will be limited. If someone tries to check the box of a record beyond the allowed maximum, the - box will be unchecked automatically upon saving. + The actual limit is defined with the validation property :ref:`validation `. - The actual limit is defined with the validation property :ref:`validation `. + maximumRecordsCheckedInPid + Similar to :code:`maximumRecordsChecked` but with the validation scope limited to records stored in the same page. - maximumRecordsCheckedInPid - Similar to :code:`maximumRecordsChecked` but with the validation scope limited to records stored in the same page. - -.. _tca_example_checkbox_7: +.. _tca_example_checkbox_7: Examples ======== -.. include:: /Images/Rst/Checkbox7.rst.txt -.. include:: /CodeSnippets/Checkbox7.rst.txt +.. include:: /Images/Rst/Checkbox7.rst.txt +.. include:: /CodeSnippets/Checkbox7.rst.txt diff --git a/Documentation/ColumnsConfig/Type/Check/Properties/Index.rst b/Documentation/ColumnsConfig/Type/Check/Properties/Index.rst index 60074f89..abad9576 100644 --- a/Documentation/ColumnsConfig/Type/Check/Properties/Index.rst +++ b/Documentation/ColumnsConfig/Type/Check/Properties/Index.rst @@ -1,9 +1,9 @@ -.. include:: /Includes.rst.txt -.. _columns-check-properties-behaviour: -.. _columns-check-properties-fieldInformation: -.. _columns-check-properties-fieldWizard: -.. _columns-check-properties-itemsprocfunc: -.. _columns-check-properties-readOnly: +.. include:: /Includes.rst.txt +.. _columns-check-properties-behaviour: +.. _columns-check-properties-fieldInformation: +.. _columns-check-properties-fieldWizard: +.. _columns-check-properties-itemsprocfunc: +.. _columns-check-properties-readOnly: ========== Properties @@ -15,27 +15,27 @@ Special properties Checkboxes (type = 'check') of all rendering types share the following Properties: -.. toctree:: +.. toctree:: - Cols - Default - Eval - InvertStateDisplay - Items - RenderType - Validation + Cols + Default + Eval + InvertStateDisplay + Items + RenderType + Validation Common properties ================= -* :ref:`behaviour > allowLanguageSynchronization ` -* :ref:`fieldInformation ` -* :ref:`fieldWizard ` with the following options +* :ref:`behaviour > allowLanguageSynchronization ` +* :ref:`fieldInformation ` +* :ref:`fieldWizard ` with the following options - * :ref:`defaultLanguageDifferences ` - * :ref:`localizationStateSelector ` - * :ref:`otherLanguageContent ` + * :ref:`defaultLanguageDifferences ` + * :ref:`localizationStateSelector ` + * :ref:`otherLanguageContent ` -* :ref:`itemsProcFunc ` -* :ref:`readOnly ` +* :ref:`itemsProcFunc ` +* :ref:`readOnly ` diff --git a/Documentation/ColumnsConfig/Type/Check/Properties/InvertStateDisplay.rst b/Documentation/ColumnsConfig/Type/Check/Properties/InvertStateDisplay.rst index 32f80d8a..fc7a326e 100644 --- a/Documentation/ColumnsConfig/Type/Check/Properties/InvertStateDisplay.rst +++ b/Documentation/ColumnsConfig/Type/Check/Properties/InvertStateDisplay.rst @@ -1,19 +1,19 @@ -.. include:: /Includes.rst.txt -.. _columns-check-properties-invertStateDisplay: +.. include:: /Includes.rst.txt +.. _columns-check-properties-invertStateDisplay: ================== invertStateDisplay ================== -.. confval:: invertStateDisplay +.. confval:: invertStateDisplay + :name: check-invertStateDisplay + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] + :type: boolean + :Scope: Display + :Default: false - :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] - :type: boolean - :Scope: Display - :Default: false - - The state of a checkbox can be displayed inverted when this property is - set to true. + The state of a checkbox can be displayed inverted when this property is + set to true. Example ======= @@ -21,8 +21,8 @@ Example Toggle checkbox with invertStateDisplay --------------------------------------- -.. include:: /Images/Rst/Checkbox18.rst.txt -.. include:: /CodeSnippets/Checkbox18.rst.txt +.. include:: /Images/Rst/Checkbox18.rst.txt +.. include:: /CodeSnippets/Checkbox18.rst.txt Field hidden/visible in table tt_content ---------------------------------------- @@ -33,4 +33,4 @@ record is visibile. However the field usually carries a label like field is set to 0. The following examples is from the core, table :sql:`tt_content`: -.. include:: /CodeSnippets/TtContentHidden.rst.txt +.. include:: /CodeSnippets/TtContentHidden.rst.txt diff --git a/Documentation/ColumnsConfig/Type/Check/Properties/Items.rst b/Documentation/ColumnsConfig/Type/Check/Properties/Items.rst index 0ef16de7..5f00a5c0 100644 --- a/Documentation/ColumnsConfig/Type/Check/Properties/Items.rst +++ b/Documentation/ColumnsConfig/Type/Check/Properties/Items.rst @@ -1,67 +1,67 @@ -.. include:: /Includes.rst.txt -.. _columns-check-properties-items: +.. include:: /Includes.rst.txt +.. _columns-check-properties-items: ===== items ===== -.. confval:: items +.. confval:: items + :name: check-items + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] + :type: array + :Scope: Display - :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] - :type: array - :Scope: Display + If set, this array will create an array of checkboxes instead of just a single "on/off" checkbox. - If set, this array will create an array of checkboxes instead of just a single "on/off" checkbox. + .. note:: + You can have a maximum of 31 checkboxes in such an array and each element is represented by a single bit + in the integer value which ultimately goes into the database. - .. note:: - You can have a maximum of 31 checkboxes in such an array and each element is represented by a single bit - in the integer value which ultimately goes into the database. + In this array each entry is itself an associative array. + The value sent to the database will be an integer representing a bit mask based on the position of the checkbox + in this array. - In this array each entry is itself an associative array. - The value sent to the database will be an integer representing a bit mask based on the position of the checkbox - in this array. + A basic item looks like this: - A basic item looks like this: + .. code-block:: php - .. code-block:: php + 'items' => [ + ['label' => 'Green tomatoes'], // Note these should be LLL references + ['label' => 'Red peppers'], + ], - 'items' => [ - ['label' => 'Green tomatoes'], // Note these should be LLL references - ['label' => 'Red peppers'], - ], + .. deprecated:: 12.3 - .. deprecated:: 12.3 + Using the numerical index :php:`0` for setting the label is deprecated. + Use the newly introduced :php:`label` key. - Using the numerical index :php:`0` for setting the label is deprecated. - Use the newly introduced :php:`label` key. + Further properties can be set per item, but not all of them apply to all renderTypes: - Further properties can be set per item, but not all of them apply to all renderTypes: + label (string or LLL reference) + The displayed title. - label (string or LLL reference) - The displayed title. + invertStateDisplay (boolean) + All renderTypes. If set to true, checked / unchecked state are swapped in view: A checkbox is marked checked if + the database bit is *not* set and vice versa. - invertStateDisplay (boolean) - All renderTypes. If set to true, checked / unchecked state are swapped in view: A checkbox is marked checked if - the database bit is *not* set and vice versa. + iconIdentifierChecked (string) + Only if renderType is not set (default): An optional icon shown is selected / on. If not set, a check mark + icon is used. - iconIdentifierChecked (string) - Only if renderType is not set (default): An optional icon shown is selected / on. If not set, a check mark - icon is used. + iconIdentifierUnchecked (string) + Only if renderType is not set (default): An optional icon shown selected / on. If not set, no icon is + show (check mark icon not displayed). - iconIdentifierUnchecked (string) - Only if renderType is not set (default): An optional icon shown selected / on. If not set, no icon is - show (check mark icon not displayed). + labelChecked (string) + Mandatory property for renderType `checkboxLabeledToggle`: Text shown if element is selected / on. - labelChecked (string) - Mandatory property for renderType `checkboxLabeledToggle`: Text shown if element is selected / on. + labelUnchecked (string) + Mandatory property for renderType `checkboxLabeledToggle`: Text shown if element is not selected. - labelUnchecked (string) - Mandatory property for renderType `checkboxLabeledToggle`: Text shown if element is not selected. - -.. _tca_example_checkbox_3: +.. _tca_example_checkbox_3: Examples ======== -.. include:: /Images/Rst/Checkbox3.rst.txt -.. include:: /CodeSnippets/Checkbox3.rst.txt +.. include:: /Images/Rst/Checkbox3.rst.txt +.. include:: /CodeSnippets/Checkbox3.rst.txt diff --git a/Documentation/ColumnsConfig/Type/Check/Properties/RenderType.rst b/Documentation/ColumnsConfig/Type/Check/Properties/RenderType.rst index edcd9d45..32719a09 100644 --- a/Documentation/ColumnsConfig/Type/Check/Properties/RenderType.rst +++ b/Documentation/ColumnsConfig/Type/Check/Properties/RenderType.rst @@ -1,22 +1,22 @@ -.. include:: /Includes.rst.txt -.. _columns-check-properties-renderType: +.. include:: /Includes.rst.txt +.. _columns-check-properties-renderType: ========== renderType ========== -.. confval:: renderType +.. confval:: renderType + :name: check-renderType + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] + :type: boolean + :Scope: Display + :Default: check - :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] - :type: boolean - :Scope: Display - :Default: check + Three different render types are currently available for the check box field: - Three different render types are currently available for the check box field: - - * :ref:`check ` - * :ref:`checkboxToggle ` - * :ref:`checkboxLabeledToggle ` + * :ref:`check ` + * :ref:`checkboxToggle ` + * :ref:`checkboxLabeledToggle ` Examples ======== @@ -24,15 +24,15 @@ Examples default ------- -.. include:: /Images/Rst/Checkbox2.rst.txt +.. include:: /Images/Rst/Checkbox2.rst.txt checkboxToggle -------------- -.. include:: /Images/Rst/Checkbox17.rst.txt +.. include:: /Images/Rst/Checkbox17.rst.txt checkboxLabeledToggle --------------------- -.. include:: /Images/Rst/Checkbox19.rst.txt +.. include:: /Images/Rst/Checkbox19.rst.txt diff --git a/Documentation/ColumnsConfig/Type/Check/Properties/Validation.rst b/Documentation/ColumnsConfig/Type/Check/Properties/Validation.rst index fd94c25e..4d87e46b 100644 --- a/Documentation/ColumnsConfig/Type/Check/Properties/Validation.rst +++ b/Documentation/ColumnsConfig/Type/Check/Properties/Validation.rst @@ -1,25 +1,25 @@ -.. include:: /Includes.rst.txt -.. _columns-check-properties-validation: +.. include:: /Includes.rst.txt +.. _columns-check-properties-validation: ========== validation ========== -.. confval:: validation +.. confval:: validation + :name: check-validation + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] + :type: array + :Scope: Proc. - :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] - :type: array - :Scope: Proc. - - Values for the :ref:`eval ` rules. The keys of the array must correspond to the - keyword of the related evaluation rule. For :code:`maximumRecordsChecked` and :code:`maximumRecordsCheckedInPid` - the value is expected to be an integer. + Values for the :ref:`eval ` rules. The keys of the array must correspond to the + keyword of the related evaluation rule. For :code:`maximumRecordsChecked` and :code:`maximumRecordsCheckedInPid` + the value is expected to be an integer. Examples ======== -.. _tca_example_checkbox_8: +.. _tca_example_checkbox_8: Only one record can be checked =============================== @@ -27,6 +27,6 @@ Only one record can be checked In the example below, only one record from the same table will be allowed to have that particular box checked. -.. include:: /Images/Rst/Checkbox8.rst.txt +.. include:: /Images/Rst/Checkbox8.rst.txt -.. include:: /CodeSnippets/Checkbox8.rst.txt +.. include:: /CodeSnippets/Checkbox8.rst.txt diff --git a/Documentation/ColumnsConfig/Type/Check/Toggle.rst b/Documentation/ColumnsConfig/Type/Check/Toggle.rst index 46a46426..87dd00a4 100644 --- a/Documentation/ColumnsConfig/Type/Check/Toggle.rst +++ b/Documentation/ColumnsConfig/Type/Check/Toggle.rst @@ -1,5 +1,5 @@ -.. include:: /Includes.rst.txt -.. _columns-check-checkboxToggle: +.. include:: /Includes.rst.txt +.. _columns-check-checkboxToggle: =============== Toggle checkbox @@ -11,32 +11,32 @@ as one or several toggle switches. As opposed to the :ref:`Labeled toggle checkbox ` no additional labels for the states can be defined. -.. include:: /Images/Rst/Checkbox17.rst.txt -.. include:: /Images/Rst/Checkbox18.rst.txt +.. include:: /Images/Rst/Checkbox17.rst.txt +.. include:: /Images/Rst/Checkbox18.rst.txt Its state can be inverted via :code:`invertStateDisplay`. Examples ======== -.. _tca_example_checkbox_17: +.. _tca_example_checkbox_17: Example: Single checkbox with toggle ------------------------------------ -.. include:: /Images/Rst/Checkbox17.rst.txt -.. include:: /CodeSnippets/Checkbox17.rst.txt +.. include:: /Images/Rst/Checkbox17.rst.txt +.. include:: /CodeSnippets/Checkbox17.rst.txt `checkboxToggle`: Instead of checkboxes, a toggle item is displayed. -.. _tca_example_checkbox_18: +.. _tca_example_checkbox_18: Example: Single checkbox with toggle inverted state display ----------------------------------------------------------- -.. include:: /Images/Rst/Checkbox18.rst.txt -.. include:: /CodeSnippets/Checkbox18.rst.txt +.. include:: /Images/Rst/Checkbox18.rst.txt +.. include:: /CodeSnippets/Checkbox18.rst.txt `invertedStateDisplay`: A checkbox is marked checked if the database bit is not set and vice versa.