如何使用条件隐藏表单中的字段?

问题描述

因此,我试图根据此文档使用Variants隐藏表单中的字段:

https://docs.typo3.org/c/typo3/cms-form/master/en-us/I/Concepts/Variants/Index.html

这是我的YAML表单定义配置,其中一个字段需要带条件隐藏,并且根本不起作用:

    properties:
      options:
        Villa: Villa
        Fritidshus: Fritidshus
        Bostadsratt: Bostadsrätt
    type: SingleSelect
    identifier: singleselect-4
    label: 'Ditt/ert boende'
  -
    defaultValue: ''
    type: Text
    identifier: text-9
    label: 'Fastighetsbeteckning vid val Villa'
    variants:
      -
        identifier: variant-1
        condition: 'formValues["singleselect-4"] == "Bostadsratt"'
        renderingOptions:
          enabled: false
  -`

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)