简体   繁体   中英

TYPO3 EXT:powermail prefill or preselect a field via url

I have my own TYPO3 plugin that displays records. 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.

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

The standard way

Prefilling (input, textarea, hidden) or preselecting (select, check, radio) of fields will be done by the PrefillFieldViewHelper. It listen to the following methods and parameters (in this ordering):

  1. GET/POST param like &tx_powermail_pi1[field][marker]=value
  2. GET/POST param like &tx_powermail_pi1[marker]=value
  3. GET/POST param like &tx_powermail_pi1[field][123]=value
  4. GET/POST param like &tx_powermail_pi1[uid123]=value
  5. If field should be filled with values from FE_User (see field configuration)
  6. If field should be prefilled from static Setting (see field configuration)
  7. Fill with TypoScript cObject like

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

     plugin.tx_powermail.settings.setup.prefill { # Fill field with marker {email} email = mail@domain.org } 
  9. Fill with your own PHP with a Signal. Look at In2codePowermailViewHelpersMiscPrefillFieldViewHelper::render()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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