Closed (duplicate)
Project:
Drupal core
Version:
8.0.x-dev
Component:
forms system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
17 Dec 2010 at 13:33 UTC
Updated:
29 Jul 2014 at 19:15 UTC
Jump to comment: Most recent file
Comments
Comment #1
redndahead commentedThe patch is missing. I think this is really important can you please post it?
Comment #2
redndahead commentedHere is my attempt.
Comment #3
redndahead commentedhmm let's put the right patch this time
Comment #5
redndahead commenteddon't know why tests would be failing retesting.
Comment #6
redndahead commented#3: 1001172-mulivalue_states-1.patch queued for re-testing.
Comment #8
redndahead commented#3: 1001172-mulivalue_states-1.patch queued for re-testing.
Comment #9
redndahead commentedThis would be the eventual complete fix in d8. #735528: FAPI #states: Fix conditionals to allow OR and XOR constructions But I think this is a good middle ground for d7. The syntax changes compared to the d8 patch is minimal.
Comment #10
redndahead commentedHere is a module to test with. Apply the patch and go to yoursite.com/examples/form_example/states
Text will appear if you choose "Four" or "Lots" in the drop down.
Here is the form code used.
Comment #11
BenK commentedSubscribing
Comment #12
rfayWhile this has clear merit, it's actually a little tiny API change, and I just would rather not do that now, especially when changes like this can be done in contrib. #735528: FAPI #states: Fix conditionals to allow OR and XOR constructions was probably the right way to do this and it didn't get in.
Sorry, but IMO this should wait, and please make a nice module and link to it here because everybody will want to do this.
Comment #13
AdrianB commentedSubscribing.
Comment #14
redndahead commentedI'm going to mark this as a duplicate so it doesn't linger. Not really necessary if it isn't going in d7.
duplicate of #735528: FAPI #states: Fix conditionals to allow OR and XOR constructions
Comment #15
peem83 commentedThis patch allows to build OR constructions like in example in the issue description :
'visible' => array(
JQUERY_SELECTOR => array('value' => array('value_1', 'value_2', ....)),
...
),
the field will be visible if selector has value_1 OR value_2
Comment #16
redndahead commented@peem83 all work on this issue is now done here #735528: FAPI #states: Fix conditionals to allow OR and XOR constructions