Feature #82074

EXT:form: Support for conditions in form configuration

Added by Thorben Nissen 4 months ago. Updated 10 days ago.

Status:
Under Review
Priority:
Should have
Category:
Form Framework
Target version:
-
Start date:
2017-08-10
Due date:
% Done:

0%

PHP Version:
Tags:
Complexity:
Sprint Focus:
Remote Sprint

Description

Comparing EXT:form framework with formhandler, as the last one is dead now with CMS 8, I'm missing some features. One of them is using conditions in the form configuration, allowing to change form behaviour based on e.g. field values, environment variables or application context.

Possible scenarios for this are:
  • Change validation rules, based on a field value, e.g. a certain value from a select field
  • Change redirect page (for redirect finisher) based on a certain selection
  • Add additional finisher (e.g. newsletter subscription) if the checkbox (I like to receive the newsletter) is checked

This is of course nothing to be used with the backend editor. This is only necessary and usable with more complex forms, that are not editable in the backend anyway.
The conditions should be placed on the form configuration's root level and look like this:

conditions:
  -
    condition: 'FIELD:signup:==:yes'
    then:
      finishers:
        1:
          options:
            pageUid: 287
    else:
      finishers:
        1:
          options:
            pageUid: 288
  -
    condition: 'applicationContext:Development*'
    then:
      finishers:
        1:
          options:
            pageUid: 304
  -
    condition: 'AND'
    conditions:
      -
        condition: 'FIELD:signup:==:no'
      -
        condition: 'OR'
        conditions:
          -
            condition: 'applicationContext:Production*'
          -
            condition: 'applicationContext:Development*'
    then:
      finishers:
        1:
          options:
            pageUid: 305

We had a little discussion about this in the slack channel about placing the condition at each item separately instead of the root level. But first this would make the parsing much more complicated and second would this bloat the configuration even more. In most cases, would one condition(-tree) not only effect one setting but more, so the root level approach would be much better in that case.

It would be very helpful, if this would be backported to CMS 8, so we have a better replacement to formhandler.

History

#1 Updated by Gerrit Code Review 4 months 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/53672

#2 Updated by Gerrit Code Review 4 months 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/53672

#3 Updated by Thorben Nissen 4 months ago

  • Category set to Form Framework

#4 Updated by Gerrit Code Review 4 months 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/53672

#5 Updated by Gerrit Code Review 3 months 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/53672

#6 Updated by Gerrit Code Review 3 months 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/53672

#7 Updated by Gerrit Code Review 3 months ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53672

#8 Updated by Gerrit Code Review 3 months ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53672

#9 Updated by Gerrit Code Review 3 months ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53672

#10 Updated by Gerrit Code Review 3 months ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53672

#11 Updated by Gerrit Code Review 3 months ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53672

#12 Updated by Gerrit Code Review 3 months ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53672

#13 Updated by Gerrit Code Review 3 months ago

Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53672

#14 Updated by Bjoern Jacob 3 months ago

  • Sprint Focus set to Remote Sprint

#15 Updated by Gerrit Code Review 3 months ago

Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53672

#16 Updated by Gerrit Code Review 3 months ago

Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53672

#17 Updated by Gerrit Code Review 3 months ago

Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53672

#18 Updated by Gerrit Code Review 3 months ago

Patch set 16 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53672

#19 Updated by Gerrit Code Review 3 months ago

Patch set 17 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53672

#20 Updated by Gerrit Code Review 3 months ago

Patch set 18 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53672

#21 Updated by Gerrit Code Review 3 months ago

Patch set 19 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53672

#22 Updated by Gerrit Code Review 3 months ago

Patch set 20 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53672

#23 Updated by Gerrit Code Review 2 months ago

Patch set 21 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53672

#24 Updated by Gerrit Code Review 2 months ago

Patch set 22 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53672

#25 Updated by Gerrit Code Review about 2 months ago

Patch set 23 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53672

#26 Updated by Ralf Zimmermann 10 days ago

  • Assignee set to Ralf Zimmermann

Also available in: Atom PDF