Project

General

Profile

Bug #79315

Updated by Ralf Zimmermann over 7 years ago

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. 

Back