Bug #79315
closedEpic #77909: Enhance EXT:form
Feature #77910: Introduce new form framework
EXT:form - reset templatePathAndFilename if needed
0%
Description
Each formelement template will be searched by its element name within the configured fluid "templateRootPaths".
It is also possible to define a concrete template file using the form element configuration "renderingOptions.templatePathAndFilename".
The TYPO3\CMS\Form\Mvc\View\FormView has to reset this configuration if a previous rendered form element has set this "templatePathAndFilename" within fluid's "TemplatePaths" class.
Otherwise the current rendered formelement want to use the templatePathAndFilename instead of the "templateRootPaths".
Use this example to test this behavior
https://code.tritum.de/TYPO3.CMS/ext_form_example1484320188
This example provide a predefined form definition called "Custom base elements".
Install this Extension, include the statics, create a nee "Form" Contentelement and select this form.
This form show you 2 form elements.
The first one is configured to use a concrete template ('EXT:form/Resources/Private/Frontend/Templates/FormElements/RadioButton.html'), the second one has to find its template by the default behavior (search a template called "Text" within the "templateRootPaths")
Without this patch the "TemplatePaths" keep the "templatePathAndFilename = "EXT:form/Resources/Private/Frontend/Templates/FormElements/RadioButton.html" property from the first element and try to apply this to the second element, which is wrong. The second element will not be shown.
Updated by Gerrit Code Review almost 8 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51307
Updated by Ralf Zimmermann almost 8 years ago
- Status changed from Under Review to Closed
Fixed with https://review.typo3.org/#/c/51410