Issue Feature Under Review Orphaned

#99997Support disabling of flexform section object fields via PageTS TCEFORM

Justus Moroni 02/20/23, 17:40 updated 04/12/25, 12:25

Description

It is currently possible to disable flexform fields via PageTS TCEFORM:
https://docs.typo3.org/m/typo3/reference-tsconfig/main/en-us/PageTsconfig/TceForm.html#disabled

This only works on the first level of flexform for the fields inside of sheets.

I suggest that this is extended to also be able to disable fields inside the structure of flexform.
When using the type “array” and section is set to “1” it is possible to add new items like with the “inline” field type.

My suggestion would be that it is possible to define the following PageTS config:

TCEFORM.tt_content.pi_flexform.my_ext_pi1.sDEF.myField.section.disabled = 1
TCEFORM.tt_content.pi_flexform.my_ext_pi1.sDEF.myField.section.sectionField.disabled = 1

I will add a patch with my proposed changes and new test cases.

Reviews 1

History 313

  1. Stefan Bürk commented <span data-processor="relativetime" data-value="2025-04-12T12:19:35+00:00" > 04/12/25, 12:19 </span>

    The linked gerrit change https://review.typo3.org/c/Packages/TYPO3.CMS/+/77905
    on changeset 8 is way not ready and crash in some scenarios. On the one side,
    these are technical issues and on the other hand the `user experience` needs to
    be investigated and how to deal with these. Or better to say, define how it should
    work for the user and what user expects and can expect.

    With the current state, following issue rises up:

    • The `add section` button for a complete disabled (and removed) section is not
      removed from the listing below the section field. Clicking sends a AJAX calls
      which returns a exception (debug mode) and is not working related to retrieve
      labels.
    • If all fields of a section is disabled and therefore removed, leaving a empty
      section the same ajax error occurs and new elements are not creatable. Beside
      the technical issue a empty section should be removed all together, which may
      be doable in the current change as a second loop after the first removing loop.
      Leading to the kept inoperable `add button` mentioned in the point above.
    • Assumend that the issues with the ajax call and the `add button` are handled,
      the next point is what should happen with already selected/added items of the
      disabled (removed) section type. Currently, they are also not displayed and
      are not removed when persisting the record. That is good and bad, depending
      on the point of view. Good, because they are not lost. For others bad as they
      cannot be removed and still used/handled/displayed in the frontend (assuming
      they are used to render stuff) leading to a confusion for editors which can’t
      find the output in the record.