Postponed (maintainer needs more info)
Project:
Conditional Fields
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
10 Feb 2017 at 19:32 UTC
Updated:
29 Apr 2025 at 10:33 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
efrainhHi, thank you for reporting this but the same issue was already reported here: https://www.drupal.org/node/2530770
Comment #3
megan_m commentedI don't believe it is the same issue, or maybe the solution is the same (?).
This is issue is describing conditional field directly on a node, affecting a paragraphs reference field on that node. If I understand the other issue correctly, the conditionals are within the paragraph bundle, and they do work the first time. In this case they don't work at all.
Comment #4
garek007 commentedHI I experienced this issue recently as well. Is there an easy way I can fix this myself?
Comment #5
labboy0276 commentedThe issue you linked to is not the same issue. I am reopening this as this does need to be addressed. The issue you linked to is for cardinality issues within paragraphs and conditional fields.
Conditional Fields 8.x just does not work with paragraphs. I have a similar situation where I tried to hide a paragraph field with a select list on load of the node edit page. it does not work, it does not hide it.
Comment #6
devil2005 commentedI confirm this issue (drupal 8.3.2 and paragraphs 8.x-1.1)
Thanks
Comment #7
piggito commentedHi, I think we need more details about the failing cases. I have just tested dev version with drupal 8.3.2 and paragraph 8.x-1.1 and it worked for me.
In my case I used a paragraph with 2 date fields as the target, a boolean field as the controller field and the condition was to make it invisible when the boolean field is checked.
Maybe it is related to some specific behavior in the target field.
Comment #8
megan_m commentedYes, this is working for me too now, following the above instructions.
I am getting this error when I create the conditional:
But that's probably a different problem.
Comment #9
labboy0276 commentedpiggito, I am using a select list but the rest is similar to your setup.
Comment #10
labboy0276 commentedI just updated everything and tested again, still doesn't work. In fact conditional fields isn't working with a select list at all. I will open a separate issue for that.
Comment #11
semisem commentedI am having the same issue too. Added a paragraph field as target, another paragraph field is the control field conditional field dependency does not work at all.
Comment #12
yuanyuan.zhang commentedYes I am having the same issue. I have a paragraph field with regular text and another paragraph field with media bundle, both controlled by a text list, and neither of them works.
Comment #13
piggito commentedHi,
I have tested again with Drupal core 8.3.3, Paragraphs 1.1 and Conditional Fields dev version and still couldn't reproduce the issue. I'm adding some screenshots of my test and maybe it could help if we get some screenshots of the missing cases to find a pattern.
to show Paragraph with Number Field when Text List value is "value 1"
and to show Paragraph with Text Field when value is "value 2"
So as you see it seems to be working fine.
Comment #14
sashken2 commentedCreate field "field_list_text" in 1st or 2nd Paragraph and try again
Comment #15
OlgaRabodzei commentedHello everyone!
I checked once more with steps to reproduce in the description of this issue and can't reproduce the bug. Is it actual?
Could someone provide new STP or better a javascript test (tutorial)?
Regards Olga.
Comment #16
schackattack commentedDrupal 8.3.3 + Conditional FIelds 8.x-1.0-alpha2 and Paragraphs 8.x-1.1 doesn't work.
Comment #17
scott_euser commentedI can confirm, this is an issue with the 'Entity reference revisions' widget used in combination with Paragraphs.
The paragraph widget in this case is wrapped in a container and the container does not have a title. Without a title, the after build callback assumes conditional fields doesn't apply:
This solves it:
Patch attached.
Comment #18
labboy0276 commentedThank You, this works for paragraphs that haven't been triggered yet.
Comment #19
mikemadison commentedthe good news is that the patch applies cleanly and conditional fields is now working with paragraph fields. the bad news is that when i submit the conditional fields form to add new rules for conditional fields, i get a PHP warning because of an undefined offset. It's unclear to me if this is directly related to this work or not? We could certainly fix the issue with a simple isset check prior to the other code in the submitForm method.
Comment #20
Benjoun commentedIs this patch will help with this related issue https://www.drupal.org/node/2902164 ?
Unfortunately, though it has been posted 3 month ago and we are a few to face the problem, no developpers have given any answer.
Comment #21
colan#19: That looks like #2843977: Undefined offset 0 exception.
Comment #22
colanUpdating title to distinguish from #2902164: Controlled-by fields inside a Paragraph don't work.
Comment #23
colan#20: It's related, but not the same issue. See the description over there; it will explain the difference.
#17 no longer applies. Is this still a problem with
the latest dev branchthe just-released alpha3? That section of the code was rewritten recently.Comment #24
colanComment #25
slydevil commentedI have just run into this issue with Drupal 8.4.4 and conditional fields 8.x-1.0-alpha4. Looks like the last commit is the alpha4 release. I'll see if I can get to the root of the issue and come up with a patch.
Comment #26
slydevil commentedComment #27
slydevil commentedSorry, my issue is actually #2902164, reverting.
Comment #28
colanThis should probably wait for #1161314: Add basic Field Group support for ANDing conditions. Lots of refactoring (for general type of groups) going on there.
Comment #29
colanActually, marking fixed as nobody's confirmed that this is still broken in over 2 years.
Comment #31
tanmaykCreated simple paragraph type & 2 fields (select list & text field). Added condition to show/hide text field based on the value of a select list. The text field is always visible. No error in console or Drupal logs. It is still broken in 1.0-alpha10.
Drupal: 8.9.13
Conditional Fields: 1.0-alpha10
Paragraphs: 1.12
The combination of paragraphs & conditional_fields is very useful & should be working as expected. Please point to the correct the issue if I am updating the wrong one.
Comment #32
dqd"Should" and "expected" are complicated terms in connection with community driven projects. Consider this phrasing a little bit unfortunate choice.
As you stated you tested on 1.0-alpha10 but this issue is for 8.x-1.x-dev - so please test the proper branch and report back if it is still not working. Thanks for understanding and any help is appreciated.
Comment #33
justinchev commentedThis is something I'm also experiencing. Conditional fields work fine within a regular node, but the exact same type of managed field conditions don't work within 'Paragraphs'.
I'm using the following versions:
Steps to reproduce are similar to what others have said:
When selecting the checkbox I don't see any changes happening in the html, eg 'css display none' being applied as it does when using a regular node content type.
I'm using the 'Gin Admin' theme, but tried switching back to 'Claro' but that didn't make a difference.