1

I tried different ways to set sender mail enabled only if a checkbox in the form is activated, but always failed.

1st try:

sender.enable=1
sender.enable.if.isTrue.data=GP:tx_powermail_pi1|field|checkboxfield

2nd try:

[traverse(request.getQueryParams(), 'tx_powermail_pi1/field/checkboxfield') > 0]

3rd try:

sender.enable=CASE
sender.enable.key.data=GP:tx_powermail_pi1|field|checkboxfield
sender.enable.1=1
sender.enable.default=0

4th try:

sender.enable.field=checkbox

Is it possible? What's the right way to do it?

Thank you very much.

1 Answers1

1

This won't work because sender.enable does not accept TypoScript content objects in line https://github.com/einpraegsam/powermail/blob/develop/Configuration/TypoScript/Main/Configuration/04_MailSender.typoscript#L6 I think you have to work with TypoScript conditions to enable or disable it.

Alex Kellner
  • 1,263
  • 6
  • 11
  • That's what I did in the 2nd try. But no mail was sent. Which condition should I check? – krischanski Nov 25 '22 at 16:29
  • Since an empty subject disables sender/receiver mail, wouldn't it then be possible to use the cObject on `plugin.tx_powermail.settings.setup.sender.overwrite.subject`? – Julian Hofmann Nov 25 '22 at 22:53