Hide FlexForm options in TYPO3 backend

Every TYPO3 integrator will get in touch with Georg Ringer's "news" extension sooner or later. It comes with several plugins and uncountable configuration options in the plugin's FlexForms.

I prefer to have clean backends and show only the fields, which are required. This is possible by hiding single FlexForm options, full FlexForm tabs or even the complete FlexForm field for single plugins.

Here is an example how you could do it:

TCEFORM.tt_content.pi_flexform {
  news_newsliststicky {
    # disable a full flexform tab
    sDEF.disabled = 1

    # explicitly disable fields in a flexform tab    
    template {
      settings\.media\.maxWidth.disabled = 1
      settings\.media\.maxHeight.disabled = 1
      settings\.cropMaxCharacters.disabled = 1
      #settings\.templateLayout.disabled = 1
    }
  }
  
  # disable the full flexform field for a specific CType
  types.news_newsdetail.disabled = 1
}

For additional reading, visit https://docs.typo3.org/m/typo3/reference-tsconfig/main/en-us/PageTsconfig/TceForm.html