Bug #82252
closedTyposcript formDefinitionOverrides do override the Flexform setting overrides
100%
Description
We are using the typoscript "formDefinitionOverrides" to be able to set form definition settings depending on the current environment and language.
This does work fine and looks like this:
plugin.tx_form {
settings {
formDefinitionOverrides {
ContactForm {
finishers {
0 {
options {
recipientAddress = {$plugin.configuration.site.extensions.form.contact.recipientAddress}
}
}
}
}
}
}
}
But it should be possible to override these settings by the flexform finisher overrides. Unfortunately the ordering in the "FormFrontendController" makes this impossible:
$formDefinition = $this->formPersistenceManager->load($this->settings['persistenceIdentifier']);
$formDefinition['persistenceIdentifier'] = $this->settings['persistenceIdentifier'];
$formDefinition = $this->overrideByFlexFormSettings($formDefinition);
$formDefinition = $this->overrideByTypoScriptSettings($formDefinition);
It doesn't make sense to override flexform settings by typoscript settings. In my opinion (formhandler worked the same way) the flexform settings should be the most important setting.
Updated by Denis Mir about 7 years ago
- Subject changed from Typoscript form definition overrides do override the Flexform setting overrides to Typoscript formDefinitionOverrides do override the Flexform setting overrides
Updated by Andreas Krämer about 7 years ago
I can confirm this issue (TYPO3 8.7.4).
Flexforms can be used within multiple content elements on a single page, but Typoscript can only be set for the whole page. So flexforms have to be able to overwrite the typoscript values.
Maybe this could be solved by switching line 60 and 61 in the FormFrontendController (not tested):
https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/form/Classes/Controller/FormFrontendController.php
Updated by Gerrit Code Review about 7 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54071
Updated by Łukasz Uznański about 7 years ago
- Sprint Focus changed from Remote Sprint to On Location Sprint
Updated by Gerrit Code Review about 7 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54071
Updated by Gerrit Code Review about 7 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54071
Updated by Gerrit Code Review about 7 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54071
Updated by Gerrit Code Review about 7 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54071
Updated by Łukasz Uznański about 7 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 71950c5438d4ee5095ff8c1f4b63b9d51627e739.