Deprecation: #109306 - Deprecate form editor stage template rendering functions 

See forge#109306

Description 

The Form Editor stage component provided a set of JavaScript helper functions for template-based rendering of form elements in the stage area. These functions were designed to be called from subscribers to the view/stage/abstract/render/template/perform PubSub event, which is the extension point for custom form element rendering in the stage.

With the introduction of the <typo3-form-form-element-stage-item> and <typo3-form-page-stage-item> web components (see Feature: #107058 - Simplify registration of a custom form element), the built-in template-based helper functions have been superseded. The view/stage/abstract/render/template/perform event remains available, and extension authors may continue to subscribe to it to implement fully custom stage rendering logic.

The following exported functions from @typo3/form/backend/form-editor/stage-component are deprecated:

  • eachTemplateProperty()
  • renderSimpleTemplate()
  • renderSimpleTemplateWithValidators()
  • renderCheckboxTemplate()
  • renderSelectTemplates()
  • renderFileUploadTemplates()
  • createAbstractViewFormElementToolbar() — only used by the legacy template-based rendering path. Web component-based elements handle their toolbar via the toolbarConfig property of <typo3-form-form-element-stage-item>

In addition, all Fluid partial templates in EXT:form/Resources/Private/Backend/Partials/FormEditor/Stage/ are deprecated, as they were designed for use with the template-based rendering approach described above:

  • SimpleTemplate.fluid.html
  • SelectTemplate.fluid.html
  • FileUploadTemplate.fluid.html
  • ContentElement.fluid.html
  • Fieldset.fluid.html
  • StaticText.fluid.html
  • Page.fluid.html
  • SummaryPage.fluid.html
  • _ElementToolbar.fluid.html
  • _UnknownElement.fluid.html

Impact 

Extensions that call any of the deprecated helper functions will receive IDE deprecation hints and TypeScript compiler warnings. The deprecated Fluid templates will emit an HTML comment in the rendered stage area indicating their deprecation. All deprecated functions and templates will be removed in TYPO3 v15.

Affected installations 

All extensions that:

  • call any of the deprecated JavaScript helper functions (including createAbstractViewFormElementToolbar()), typically from a subscriber of the view/stage/abstract/render/template/perform event, or
  • reference any of the deprecated Fluid partial templates via formEditorPartials in their prototype configuration.

Migration 

Two migration paths are available:

Option 1: Use the built-in web component (recommended)

Remove the custom JavaScript subscriber and omit the formEditorPartials stage partial configuration from your form element's YAML definition. The Form Editor will then render the element automatically using the built-in <typo3-form-form-element-stage-item> web component.

See Feature: #107058 - Simplify registration of a custom form element for full details.

Option 2: Implement custom rendering logic in the event subscriber

If you need to keep using the view/stage/abstract/render/template/perform event, replace calls to the deprecated helper functions with your own DOM manipulation logic.