0

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.

realpenx
  • 113
  • 15

1 Answers1

0

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.

Jo Hasenau
  • 2,526
  • 1
  • 14
  • 16
  • I changed the configuration as described, but unfortunately the form is not displayed. – realpenx Nov 17 '20 at 09:18
  • Could you post the configuration here please? – Jo Hasenau Nov 17 '20 at 10:24
  • I added the configuration to my question – realpenx Nov 17 '20 at 11:42
  • The parameter uses upper camel case, so it is resolveChildFlexFormData, not resolveChildFlexformData. Additionally you should check, if those settings actually arrive at tt_content.gridelements_pi1 since lib.gridElements.defaultGridSetup would be just a library that has to be assigned to the actual tt_content definition. – Jo Hasenau Nov 17 '20 at 12:57
  • 1
    Camel case was not the problem because I copied your solution, but in the meantime I must have entered it wrong during testing: sorry for that. The configuration was missing in tt_content.gridelements_pi1, I added it and now it works. Thanks for your help. – realpenx Nov 18 '20 at 09:14