Feature #18211
closedArray of display conditions for TCA fields instead of 1 string
Added by Robert Destigter almost 17 years ago. Updated about 7 years ago.
100%
Description
I think that the option "displayCond" should be an array of conditions instead of just one string.
'displayCond' => Array (
"FIELD:myfieldname:!=:myvalue",
"FIELD:myfieldname:IN:4,5,6",
),
(issue imported from #M7531)
Files
7531.patch (2.99 KB) 7531.patch | Administrator Admin, 2009-06-26 22:32 | ||
7531_doc_core_api_wiki.txt (1.51 KB) 7531_doc_core_api_wiki.txt | Administrator Admin, 2009-08-08 13:18 | ||
7531_4.3_cgl_v2.patch (3.03 KB) 7531_4.3_cgl_v2.patch | Administrator Admin, 2009-08-08 18:36 | ||
T3X_andor_tca_conditions-0_1_0-z-201210251526.t3x (3.98 KB) T3X_andor_tca_conditions-0_1_0-z-201210251526.t3x | Ralf Hettinger, 2012-10-25 15:32 |
Updated by Ralf Hettinger over 15 years ago
I'm in the need for a similar thing, though it is a bit more complex here. So I decided to come up with the attached patch, which allows grouping by AND or OR and works recursively... the following example reads
displayCond true if
(my_field1 &&
my_field2!=3 &&
(my_field3 || my_field4 || my_field5 && my_field6) ||
my_field7 ||
my_field8
)
[...]
'displayCond' => array (
'AND' => array (
'FIELD:my_field1:REQ:true',
'FIELD:my_field2:!=:3',
'OR' => array (
'FIELD:my_field3:REQ:true',
'FIELD:my_field4:REQ:true',
'AND' => array(
'FIELD:my_field5:REQ:true',
'FIELD:my_field6:REQ:true',
)
)
),
'OR' => array (
'FIELD:my_field7:REQ:true',
'FIELD:my_field8:REQ:true',
)
),
[...]
Updated by Ralf Hettinger over 15 years ago
forgot to mention: patched against 4.3 trunk rev. 5639
Updated by Steffen Müller over 13 years ago
any news here. is this still an issue? would be nice to have this feature
Updated by Xavier Perseguers over 13 years ago
- Target version changed from 4.6.0 to 4.6.0-beta1
Updated by Xavier Perseguers over 13 years ago
- Target version deleted (
4.6.0-beta1)
Updated by Stefano Cecere about 13 years ago
@Xavier: why did you drop this feature? i just checked it and seems ok (and useful)
should we propose it to 4.7?
Updated by Gabriel Kaufmann / Typoworx NewMedia almost 13 years ago
Stefano Cecere wrote:
@Xavier: why did you drop this feature? i just checked it and seems ok (and useful)
should we propose it to 4.7?
I also agree that this feature could be very useful! Why isn't this feature going into the core?
Updated by Gone With the Wind over 12 years ago
I'd like to join the credo! Please get it into core! Thanks!
Updated by Stefan Neufeind over 12 years ago
Haven't taken a look at the actual implementation. But yes, it would be really great to be able to combine multiple conditions.
Since 4.8 will be called 6.0 now, maybe for 6.0? :-)
Updated by Jigal van Hemert over 12 years ago
- Category set to FormEngine aka TCEforms
- Status changed from New to Accepted
- Target version set to 6.0.0-alpha3
- Complexity set to medium
Seems like a useful feature. Anyone who wants to push a patch to gerrit?
Updated by Helmut Hummel over 12 years ago
- Status changed from Accepted to Needs Feedback
How about introducing a USERFUNC: option?
Would that serve your needs. The proposed array solution looks complex and there will be edge cases which still cannot be covered
Updated by Stefan Neufeind over 12 years ago
USERFUNC for complex scenarios might be good to have. But imho we should have something built in as was proposed with that patch (though it looks complex at first). But I think for some small AND/OR it's more handy to have that builtin than through a USERFUNC whenever you need it.
Also note that USERFUNC might work on the server-side - but we have it on the client (JS) as well (flexform with displayCond).
Updated by Gerrit Code Review over 12 years ago
- Status changed from Needs Feedback to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/13508
Updated by Ralf Hettinger about 12 years ago
- File T3X_andor_tca_conditions-0_1_0-z-201210251526.t3x T3X_andor_tca_conditions-0_1_0-z-201210251526.t3x added
As author of this patch some years ago I'm hereby adding my vote for it ... :)
I haven't needed this neat feature for quite a while - as until today. The feature is tested in a productive environment since 3 years without any failures; the patch is still applying to 4.7.
For those who need a quick&dirty solution (like me today), I uploaded an extension which XClasses t3lib_tceforms (please forgive me, dear TYPO3 gods ;) )
Updated by Gabriel Kaufmann / Typoworx NewMedia about 12 years ago
You've also got my positive vote ;-)
Ralf Hettinger wrote:
As author of this patch some years ago I'm hereby adding my vote for it ... :)
For those who need a quick&dirty solution (like me today), I uploaded an extension which XClasses t3lib_tceforms (please forgive me, dear TYPO3 gods ;) )
May be there is any processing-hook that may be suiteable for adding the patch?
I think this patch is a must-have to go into the TYPO3-Core.
Updated by Helmut Hummel almost 12 years ago
- Target version changed from 6.0.0-alpha3 to 6.0.1
Updated by Gerrit Code Review almost 12 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/13508
Updated by Gerrit Code Review almost 12 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/13508
Updated by Gerrit Code Review almost 12 years ago
Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/13508
Updated by Gabriel Kaufmann / Typoworx NewMedia almost 12 years ago
Is there any plan to finally integrate multiple displayCond into the "final" TYPO3-Core anytime?
More complex TYPO3-Plugin make it really neccessary to integrate such a feature! And for now the only "Hack" ist to locally patch or XClass TYPO3 to get it working. Neither the one nore the other of these is really good to handle.
Please let us know when this feature will be going to be finally reviewed and integrated into TYPO3-Core.
Updated by Ingo Renner almost 12 years ago
Gabriel, if you want this feature so much, why is there no review from you?
Updated by Gabriel Kaufmann / Typoworx NewMedia almost 12 years ago
Ingo Renner wrote:
Gabriel, if you want this feature so much, why is there no review from you?
Well what can I say much more. I think there have been enough suggestions how to implement this feature. I would prefer the Array-Way combined with the possibility for a userFunc for more complex matches. The userFunc-Method would also keep the door's open for further matching-patterns that may be implemented into core later on.
Updated by Gerrit Code Review over 11 years ago
Patch set 5 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/13508
Updated by Gerrit Code Review over 11 years ago
Patch set 6 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/13508
Updated by Christian Kuhn over 11 years ago
- Target version changed from 6.0.1 to 6.1.0-beta1
- PHP Version changed from 5.0 to 5.3
Updated by Jigal van Hemert over 11 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset fe3e0a805e45478130fc75542a6db1da4b3e1aa4.
Updated by Steffen Müller over 11 years ago
Thanks a lot for merging this.
Does this also work in flexforms? If so, could you please give us an example?
Updated by Stefan Froemken over 11 years ago
Steffen Müller wrote:
Thanks a lot for merging this.
Does this also work in flexforms? If so, could you please give us an example?
Yes it also works in FlexForms. I just have created a documentation in german. At the bottom you see a nested example how to use this cool new feature in FlexForms.
Link: http://jweiland.net/typo3/extension-programmierung/displaycond.html
Stefan
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed