I use TYPO3 v10.4.8 with the extension gridelements and the core form extension. I have included the form into my created grid element in the backend, but it's not visible in frontend. This is a part of my grid template:
<f:if condition="{children}">
<f:for each="{children}" as="columns" key="rowNumber">
<div class="row grid-row grid-row-{rowNumber}">
<f:if condition="{columns}">
<f:for each="{columns}" as="column" key="columnNumber">
<div class="col-12 grid-column grid-column-{columnNumber}">
<f:for each="{column}" as="child">
<div class="inner">
<f:cObject typoscriptObjectPath="tt_content.{child.data.CType}" data="{child.data}" table="tt_content" />
</div>
</f:for>
</div>
</f:for>
</f:if>
</div>
</f:for>
</f:if>
My configuration:
lib.gridelements.defaultGridSetup =< lib.contentElement
lib.gridelements.defaultGridSetup {
templateName.field = tx_gridelements_backend_layout
templateName.ifEmpty = GridElement
layoutRootPaths {
10 = EXT:gridelements/Resources/Private/Layouts/
20 = {$page.fluidtemplate.templateRootPath}
}
partialRootPaths {
10 = EXT:gridelements/Resources/Private/Partials/
20 = {$page.fluidtemplate.templateRootPath}
}
templateRootPaths {
10 = EXT:gridelements/Resources/Private/Templates/
20 = {$page.fluidtemplate.templateRootPath}
}
dataProcessing {
10 = GridElementsTeam\Gridelements\DataProcessing\GridChildrenProcessor
10 {
default {
as = children
options {
resolveChildFlexFormData = 0
}
}
}
}
}
The Render.html
file from the core module is called, but the variable formConfiguration
is empty, so no form is rendered.
Since a form element uses the pi_flexform
field to select the form definition, you have to disable the automatic FlexForm resolver of Gridelements.
By default Gridelements with dataProcessing is meant to be rendering everything within a FLUID template by accessing variables and settings directly. So the default setting of the DataProcessor is to resolve FlexForm XML data into arrays.
To disable that behaviour you can use the option
resolveFlexFormData = 0
to disable it for a container and its children or
resolveChildFlexFormData = 0
to still resolve container FlexForms but skip those of child elements.