Project

General

Profile

Actions

Feature #82074

closed

EXT:form: Support for conditions in form configuration

Added by Thorben Nissen over 6 years ago. Updated about 6 years ago.

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

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

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.

Actions #1

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

Actions #2

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

Actions #3

Updated by Thorben Nissen over 6 years ago

  • Category set to Form Framework
Actions #4

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

Actions #5

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

Actions #6

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

Actions #7

Updated by Gerrit Code Review over 6 years 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

Actions #8

Updated by Gerrit Code Review over 6 years 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

Actions #9

Updated by Gerrit Code Review over 6 years 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

Actions #10

Updated by Gerrit Code Review over 6 years 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

Actions #11

Updated by Gerrit Code Review over 6 years 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

Actions #12

Updated by Gerrit Code Review over 6 years 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

Actions #13

Updated by Gerrit Code Review over 6 years 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

Actions #14

Updated by Björn Jacob over 6 years ago

  • Sprint Focus set to Remote Sprint
Actions #15

Updated by Gerrit Code Review over 6 years 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

Actions #16

Updated by Gerrit Code Review over 6 years 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

Actions #17

Updated by Gerrit Code Review over 6 years 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

Actions #18

Updated by Gerrit Code Review over 6 years 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

Actions #19

Updated by Gerrit Code Review over 6 years 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

Actions #20

Updated by Gerrit Code Review over 6 years 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

Actions #21

Updated by Gerrit Code Review over 6 years 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

Actions #22

Updated by Gerrit Code Review over 6 years 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

Actions #23

Updated by Gerrit Code Review over 6 years 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

Actions #24

Updated by Gerrit Code Review over 6 years 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

Actions #25

Updated by Gerrit Code Review over 6 years 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

Actions #26

Updated by Ralf Zimmermann over 6 years ago

  • Assignee set to Ralf Zimmermann
Actions #27

Updated by Björn Jacob about 6 years ago

  • Sprint Focus deleted (Remote Sprint)
Actions #28

Updated by Gerrit Code Review about 6 years ago

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

Actions #29

Updated by Gerrit Code Review about 6 years ago

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

Actions #30

Updated by Ralf Zimmermann about 6 years ago

  • Status changed from Under Review to Needs Feedback
  • Assignee changed from Ralf Zimmermann to Björn Jacob

We should abandon this in favor of https://review.typo3.org/c/54982/

Actions #31

Updated by Björn Jacob about 6 years ago

  • Status changed from Needs Feedback to Closed
  • Assignee deleted (Björn Jacob)

Please see Ralf's comment. We came up with a different solution which allows us to also improve the language handling.

Actions

Also available in: Atom PDF