Project

General

Profile

Actions

Bug #82252

closed

Typoscript formDefinitionOverrides do override the Flexform setting overrides

Added by Denis Mir about 7 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Form Framework
Target version:
-
Start date:
2017-08-31
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.1
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:
On Location Sprint

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.

Actions #1

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
Actions #2

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

Actions #3

Updated by Björn Jacob about 7 years ago

  • Sprint Focus set to Remote Sprint
Actions #4

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

Actions #5

Updated by Łukasz Uznański about 7 years ago

  • Sprint Focus changed from Remote Sprint to On Location Sprint
Actions #6

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

Actions #7

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

Actions #8

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

Actions #9

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

Actions #10

Updated by Łukasz Uznański about 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #11

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF