简体   繁体   English

TYPO3 EXT:powermail通过URL预填充或预选择一个字段

[英]TYPO3 EXT:powermail prefill or preselect a field via url

I have my own TYPO3 plugin that displays records. 我有自己的TYPO3插件来显示记录。 Now I want to add a link to a second page to each record. 现在,我想为每个记录添加指向第二页的链接。

The second page should be a powermail form. 第二页应该是超级邮件表格。 Now I want that the link to the second Mail contains a parameter that should prefill a input field in the powermail form. 现在,我希望第二个Mail的链接包含一个参数,该参数应预填充powermail表单中的输入字段。

Is that possible? 那可能吗? And if so how? 如果是这样怎么办?

Yes it is possible. 对的,这是可能的。 See documentation of powermail: https://docs.typo3.org/typo3cms/extensions/powermail/ForAdministrators/BestPractice/PrefillField/Index.html 请参阅Powermail的文档: https ://docs.typo3.org/typo3cms/extensions/powermail/ForAdministrators/BestPractice/PrefillField/Index.html

The standard way 标准方式

Prefilling (input, textarea, hidden) or preselecting (select, check, radio) of fields will be done by the PrefillFieldViewHelper. 字段的预填充(输入,文本区域,隐藏)或字段的预选择(选择,选中,单选)将由PrefillFieldViewHelper完成。 It listen to the following methods and parameters (in this ordering): 它侦听以下方法和参数(按此顺序):

  1. GET/POST param like &tx_powermail_pi1[field][marker]=value GET / POST参数,如&tx_powermail_pi1 [field] [marker] = value
  2. GET/POST param like &tx_powermail_pi1[marker]=value GET / POST参数,如&tx_powermail_pi1 [marker] = value
  3. GET/POST param like &tx_powermail_pi1[field][123]=value GET / POST参数,如&tx_powermail_pi1 [field] [123] = value
  4. GET/POST param like &tx_powermail_pi1[uid123]=value GET / POST参数,如&tx_powermail_pi1 [uid123] = value
  5. If field should be filled with values from FE_User (see field configuration) 是否应使用FE_User中的值填充字段(请参阅字段配置)
  6. If field should be prefilled from static Setting (see field configuration) 是否应从静态设置中预填充字段(请参阅字段配置)
  7. Fill with TypoScript cObject like 用TypoScript cObject填充,例如

     plugin.tx_powermail.settings.setup.prefill { # Fill field with marker {email} email = TEXT email.value = mail@domain.org } 
  8. Fill with simple TypoScript like 用简单的TypoScript填充

     plugin.tx_powermail.settings.setup.prefill { # Fill field with marker {email} email = mail@domain.org } 
  9. Fill with your own PHP with a Signal. 用Signal填充您自己的PHP。 Look at In2codePowermailViewHelpersMiscPrefillFieldViewHelper::render() 看一下In2codePowermailViewHelpersMiscPrefillFieldViewHelper :: render()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM