dpwdldgn43486 2017-08-23 08:08
浏览 43
已采纳

TYPO3 - Flexforms displayCond无效

I'm trying to display a conditional field, with the condition being a checked checkbox. This is the display condition:

<displayCond>FIELD:isEvent:=:1</displayCond>

Could anyone help me out? This is the full code:

 <T3DataStructure>
  <sheets>
        <sDEF>
              <ROOT>
                    <TCEforms>
                          <sheetTitle>Function</sheetTitle>
                    </TCEforms>
                    <type>array</type>
                    <el>
                          <settings.priceList>
                                <section>1</section>
                                <type>array</type>
                                <el>
                                      <container>
                                            <title>Price boxes</title>
                                            <type>array</type>
                                            <el>
                                                  <name>
                                                        <TCEforms>
                                                              <label>Seasons name</label>
                                                              <config>
                                                                    <type>input</type>
                                                                    <size>48</size>
                                                              </config>
                                                        </TCEforms>
                                                  </name>
                                                  <isEvent>                   
                                                        <TCEforms>
                                                              <exclude>0</exclude>
                                                              <label>Is event?</label>
                                                              <config>
                                                                    <type>check</type>
                                                              </config>
                                                        </TCEforms>
                                                  </isEvent>
                                                  <evenText>
                                                        <TCEforms type="array">
                                                              <exclude>0</exclude>
                                                              <label>Event text</label>
                                                              <displayCond>FIELD:isEvent:=:1</displayCond>
                                                              <config type="array">
                                                                    <type>text</type>
                                                                    <cols>48</cols>
                                                                    <rows>5</rows>
                                                              </config>
                                                              <defaultExtras>richtext[*]:rte_transform[flag=rte_enabled|mode=ts_css]</defaultExtras>
                                                        </TCEforms>
                                                  </evenText>

                                            </el>
                                      </container>
                                </el>
                          </settings.priceList>
                    </el>
              </ROOT>
        </sDEF>
  </sheets>

  • 写回答

1条回答 默认 最新

  • duanqiu9104 2017-08-23 08:35
    关注

    Sorry, this is not supported for container elements, only on the top level. There's no way to specify the index of a container element, there's no context for this in the method that evaluates the condition.

    settings.isEvent would work, but something like settings.priceList.container.0.isEvent is not supported.

    You can take a look at the code of \TYPO3\CMS\Backend\Form\FormDataProvider\EvaluateDisplayConditions::matchFieldCondition yourself to clarify.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 使用yolov5-7.0目标检测报错
  • ¥15 对于这个问题的解释说明
  • ¥200 询问:python实现大地主题正反算的程序设计,有偿
  • ¥15 smptlib使用465端口发送邮件失败
  • ¥200 总是报错,能帮助用python实现程序实现高斯正反算吗?有偿
  • ¥15 对于squad数据集的基于bert模型的微调
  • ¥15 为什么我运行这个网络会出现以下报错?CRNN神经网络
  • ¥20 steam下载游戏占用内存
  • ¥15 CST保存项目时失败
  • ¥20 java在应用程序里获取不到扬声器设备