Issue Task New Orphaned

#109861Decouple frontend templates from backend preview rendering

Josua Vogel 05/21/26, 20:30 updated 05/21/26, 20:30

Description

EXT:form currently uses a single shared set of Fluid templates for both frontend rendering (the actual form in the browser) and backend preview rendering (the form editor preview in the TYPO3 backend). This coupling creates an undesired dependency on frontend CSS in the backend.
Because the form editor preview reuses the frontend template stack, individual partials already contain previewMode conditionals like:

<f:if condition="{element.rootForm.renderingOptions.previewMode}">...</f:if>
This means:
  • Frontend templates carry backend-specific branching logic that does not belong there.
  • The backend preview depends on the frontend CSS framework being loaded in the backend.
  • Customizing frontend templates may unintentionally affect the backend preview (and vice versa).

Proposed Solution

New Fluid templates in EXT:form/Resources/Private/FormEditor/BackendPreview/ and a new configuration option:

renderingOptions:
  backendPreviewTemplateRootPaths:
    10: 'EXT:form/Resources/Private/FormEditor/BackendPreview/Templates/'
  backendPreviewPartialRootPaths:
    10: 'EXT:form/Resources/Private/FormEditor/BackendPreview/Partials/'
  backendPreviewLayoutRootPaths:
    10: 'EXT:form/Resources/Private/FormEditor/BackendPreview/Layouts/'

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

Fix this issue

Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". How to create a patch

Commit message
[TASK] Decouple frontend templates from backend preview rendering Resolves: #109861 Releases: main