Bug #92902
open
TypoScript formDefinitionOverrides recipients
Added by Raphael Zschorsch over 3 years ago.
Updated 11 months ago.
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)
The following code variation works.
YAML form definiton:
finishers:
-
options:
recipientAddress: default@example.org
recipientName: Default Name
TypoScript setup:
plugin.tx_form.settings.formDefinitionOverrides.contactForm.finishers {
0 {
options {
recipientAddress = special@example.com
recipientName = Special Name
}
}
}
- Category deleted (
Form Framework)
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.
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
}
}
}
}
- Category set to Form Framework
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.
- Related to Task #101732: Verify @-sign is a valid TypoScript identifier added
Also available in: Atom
PDF