小编dig*_*jay的帖子

如何使“<f:form.select>”成为必填字段(必填)?

用户需要从中选择一个选项:

<f:form.select name="role" options="{role}" optionLabelField="title" optionValueField="uid" size="4" />
Run Code Online (Sandbox Code Playgroud)

流体选择元素没有 required 或 minItems-Attribute。我不想检查控制器中缺少的参数,因为表单非常复杂,而且我不想让用户在 $this->redirect("show") 之后再次输入所有数据。

我更喜欢与 with 完全相同的实现:

<f:form.textfield name="foo" required="true" />
Run Code Online (Sandbox Code Playgroud)

这就像一个魅力。我该怎么做?

php typo3 fluid typo3-extensions typo3-8.x

3
推荐指数
1
解决办法
1470
查看次数

标签 统计

fluid ×1

php ×1

typo3 ×1

typo3-8.x ×1

typo3-extensions ×1