我按照如何使用自己的字段扩展 femanager 的示例...(https://docs.typo3.org/p/in2code/femanager/7.3/en-us/Features/NewFields/Index.html)
我需要添加一个列出多种用户类型的选择字段...我已经解决了这个错误:
The argument "options" was registered with type "array", but is of type "string" in view helper "In2code\Femanager\ViewHelpers\Form\SelectViewHelper".
我的新字段部分调用表单字段,如下所示:
<femanager:form.select
id="femanager_field_usertype"
property="userType"
options="{1:private, 2:business, 3:real estate agent}"
defaultOption="{f:translate(key:'pleaseChoose')}"
class="form-control"
additionalAttributes="{femanager:Validation.FormValidationData(settings:settings,fieldName:'userType')}" />
我与:
- TYPO3 V11.5.37
- 女性经理7.3.1
问题似乎出在 options 属性上:
将其更改为:
到: