[英]Field's default value by TypoScript in TYPO3 Powermail extension
有人知道是否可以使用TypoScript设置Powermail表单的任何字段的默认值(而无需创建特殊的TypoScript对象字段)?
Yes, it is possible. 对的,这是可能的。 Use the TCAdefaults typoscript object in your page ts config . 在页面ts config中使用TCAdefaults印刷对象。
TCAdefaults.tt_news.hidden = 0
This example makes tt_news entries not hidden. 此示例使tt_news条目不隐藏。 The format is 格式是
TCAdefaults.[table].[field] = [value]
and this works with everything that is inside a tca. 这适用于tca中的所有内容。 So you can practically set defaults for any field in any table. 因此,您几乎可以为任何表中的任何字段设置默认值。
Setting value of hidden field is built-in in powermail, of course it works only with fe_users
table. 隐藏字段的设置值是内置在powermail中的,当然它仅适用于fe_users
表。
When editing field you'll find it at the bottom of the properties: Fill out this field with fe_user field
编辑字段时,您会在属性底部找到它: Fill out this field with fe_user field
If you need to use other fields from DB, you can configure them via ExtensionManager. 如果需要使用数据库中的其他字段,则可以通过ExtensionManager对其进行配置。
Edit: 编辑:
There is mentioned in docs that's possible to prefill values with TS, I didn't test in, however looks, that's what are you need. 在文档中提到可以用TS预填充值,我没有进行测试,但是看起来,这就是您所需要的。
http://typo3.org/extension-manuals/powermail/1.4.14/view/1/10/#id1632010 http://typo3.org/extension-manuals/powermail/1.4.14/view/1/10/#id1632010
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.