You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

TYPO3 V11 Ext:Form隐藏标签:doNotShowLabel配置位置咨询

TYPO3 V11 Ext:Form 隐藏所有标签(含必填星号)无需修改Fluid模板方案

一、doNotShowLabel = 1的配置位置

1. 全局生效(所有表单)

在站点配置文件config.yaml中添加以下配置,所有表单元素将默认隐藏标签:

tx_form:
  settings:
    formManager:
      formElementsDefinition:
        AbstractFormElement:
          properties:
            doNotShowLabel: 1

2. 单个表单生效

打开目标表单的配置文件(通常位于Configuration/Forms/[表单名称].yaml),可针对单个元素或整个页面层级添加配置:

type: Form
identifier: your-form
label: 自定义表单
renderables:
  - type: Page
    identifier: page-1
    # 给当前页面下所有元素统一设置
    properties:
      doNotShowLabel: 1
    renderables:
      - type: Text
        identifier: username
        label: ''
        # 仅给当前单个元素设置
        properties:
          doNotShowLabel: 1

二、隐藏必填字段的星号(*)

仅隐藏标签后,必填字段的星号仍会显示,可通过以下配置关闭:

1. 全局关闭星号

在站点config.yaml中添加:

tx_form:
  settings:
    formManager:
      formElementsDefinition:
        AbstractFormElement:
          properties:
            requiredMark: ''

2. 单个表单/元素关闭星号

在表单配置文件中对应层级添加:

properties:
  requiredMark: ''

三、生效验证

完成配置后,进入TYPO3后台,依次点击「系统」→「清除缓存」,刷新前端页面即可看到效果。

内容的提问来源于stack exchange,提问作者webman

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.24 13:23:14