#92902TypoScript formDefinitionOverrides recipients
Description
Overriding recipients in form framework in TYPO3 10 through TypoScript works in frontend, but the TypoScript analyzer in backend throws an error due to the @ symbol.
Configuration:
plugin.tx_form.settings.formDefinitionOverrides.contactForm.finishers {
0 {
options {
recipients {
test@test.de = Name
}
}
}
}
*Error/Warning in backend module Template*
Warning : Line 4283: Object Name String, “test@test.de” contains invalid character “@”. Must be alphanumeric or one of: “_:-\.” (edited)
Reviews 3
Related issues 2
History 1419
-
Raphael Zschorsch commented <span data-processor="relativetime" data-value="2020-11-23T14:40:37+00:00" > 11/23/20, 14:40 </span>
-
Ayke Halder commented <span data-processor="relativetime" data-value="2021-03-17T16:11:36+00:00" > 03/17/21, 16:11 </span>
The following code variation works.
YAML form definiton:
finishers: - options: recipientAddress: default@example.org recipientName: Default NameTypoScript setup:
plugin.tx_form.settings.formDefinitionOverrides.contactForm.finishers { 0 { options { recipientAddress = special@example.com recipientName = Special Name } } } -
Raphael Zschorsch commented <span data-processor="relativetime" data-value="2021-03-17T17:43:56+00:00" > 03/17/21, 17:43 </span>
Yes, this works for TYPO3 9, but the YAML configuration changed to “recipients” in TYPO3 10.
-
Björn Jacob commented and changed category <span data-processor="relativetime" data-value="2021-08-06T12:52:32+00:00" > 08/06/21, 12:52 </span>
This is not related to form. It is a problem of the TypoScript parser. Anyway, thank you for your contribution and all of the provided information.
-
Philipp Kitzberger commented <span data-processor="relativetime" data-value="2022-02-12T17:10:27+00:00" > 02/12/22, 17:10 </span>
@Raphael, just had the very same challenge and came up with this solution that doesn’t involve writing a custom finisher: https://gist.github.com/kitzberger/7a53d517b5991769783fd7326062e157
It’s basically using the “variants” feature that got introduced with TYPO3 9.4
-
Bernhard Eckl commented <span data-processor="relativetime" data-value="2023-08-22T12:30:56+00:00" > 08/22/23, 12:30 </span>
Thanks a lot @Philipp, you saved my day! Your solution works great.
But it would be nice if the typoscript version also would work again (specially if options via data e.g. TSFE:fe_user|user|email will be used). This was my solution before:
kontakt_1 {
finishers {
0.options {
recipientAddress = CASE
recipientAddress {
key.data = GP : tx_form_formframework|kontakt_1-15509|singleselect-1
default = TEXT
default.value = email@domain.tld
1 = TEXT
1.value = anothermail@domain.tld
2 = TEXT
2.value = anothermail2@domain.tld
}
}
}
} -
Christian Kuhn changed category <span data-processor="relativetime" data-value="2023-08-22T12:36:14+00:00" > 08/22/23, 12:36 </span>
-
Christian Kuhn commented <span data-processor="relativetime" data-value="2023-08-22T13:00:26+00:00" > 08/22/23, 13:00 </span>
The misconception of ext:form with this TypoScript is having a “living value” on the left side as identifier. That’s not good design.
It would be better to do something like this:
recipients { 10 { email = test@test.de name = John Doe } 20 { ... } }As such, I’ll keep this issue open, and still think this is an issue in ext:form.
However, for the parser issue: Since v12, with the new TS parser, identifiers can contain `@`. I’ll add a patch that adds a dedicated test for this as proof.
-
Christian Kuhn changed Related to #97816 <span data-processor="relativetime" data-value="2023-08-22T13:00:37+00:00" > 08/22/23, 13:00 </span>
-
Christian Kuhn changed Related to #101732 <span data-processor="relativetime" data-value="2023-08-22T13:01:27+00:00" > 08/22/23, 13:01 </span>
-
Christian Kuhn changed
Related to #97816<span data-processor="relativetime" data-value="2023-08-22T13:16:24+00:00" > 08/22/23, 13:16 </span> -
Christian Kuhn changed Related to #97816 <span data-processor="relativetime" data-value="2024-08-18T11:11:35+00:00" > 08/18/24, 11:11 </span>
-
Bastian Holzem commented and changed TYPO3 Version
1013 PHP Version7.38.4 <span data-processor="relativetime" data-value="2025-05-28T09:35:20+00:00" > 05/28/25, 09:35 </span>Has anything changed here in the meantime?
I would like to use TypoScript to change the recipient in a Development Environment context or set a blindCarbonCopyRecipients in this context. -
Gerrit Code Review pushed patch set 1 for main to change 95599 status
NewUnder Review <span data-processor="relativetime" data-value="2026-09-03T11:30:24+00:00" > 09/03/26, 11:30 </span> -
Gerrit Code Review pushed patch set 2 for main to change 95599 <span data-processor="relativetime" data-value="2026-09-03T11:37:44+00:00" > 09/03/26, 11:37 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 95599 <span data-processor="relativetime" data-value="2026-09-04T08:11:02+00:00" > 09/04/26, 08:11 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 95599 <span data-processor="relativetime" data-value="2026-09-04T09:08:48+00:00" > 09/04/26, 09:08 </span>
-
Gerrit Code Review pushed patch set 5 for main to change 95599 <span data-processor="relativetime" data-value="2026-09-24T14:05:00+00:00" > 09/24/26, 14:05 </span>
-
Josua Vogel commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-09-24T15:10:13+00:00" > 09/24/26, 15:10 </span>Applied in changeset commit:9161218121b4137e98390abe02f9dce3c63f5c9e.
After further investigation, the @ symbol should be allowed by TypoScript parser.
https://github.com/TYPO3/TYPO3.CMS/blob/11c11675e62a8bdef428db63af291185fe35d4fc/typo3/sysext/form/Classes/Controller/FormFrontendController.php#L158
Also, the configuration needs to be:
plugin.tx_form.settings.formDefinitionOverrides.contactForm.finishers { 0 { options { recipients { test@test\.de = Name } } } }The dot in the email address, has to be escaped, otherwise it won’t work, as the dot notation of TypoScript kicks in. This is especially bad, if the email address is i.e. defined as a TypoScript constant without escaping the dot. I couldn’t figure this out yet.
This won’t work:
plugin.tx_form.settings.formDefinitionOverrides.contactForm.finishers { 0 { options { recipients > recipients { test@test\.de = Name } } } }Clearing recipients in TypoScript will not work, because here the array is merged and the default value of the YAML form file is still in the array:
Setting will not work either.https://github.com/TYPO3/TYPO3.CMS/blob/11c11675e62a8bdef428db63af291185fe35d4fc/typo3/sysext/form/Classes/Controller/FormFrontendController.php#L158