I'm not sure if this is a problem with Conditional_Fields or Paragraphs so I've created another issue here.

Conditional_Fields functions don't work for fields inside Paragraph types. Is there a patch to fix this already?

Comments

the_glitch created an issue. See original summary.

divyanshmoonat’s picture

I was also facing the same problem and here is a simple solution for this, it can be fixed using JavaScript State APIs.
Please refer to this link : Conditional Fields in Paragraphs Using the Javascript States API for Drupal 8

jungkunwar’s picture

I have tried all the available patches related to the conditional fields and paragraphs but none of they work on paragraph. In fact there is no effect on paragraph manage fields from conditional fields.

the_glitch’s picture

There's another module called field_states_ui that also does what conditional_fields does but, unlike conditional_fields, it does work inside paragraphs. I just doesn't have fade in animations. There's also a couple of new patches that it has that you should apply.

maithili11’s picture

I am still facing the same problem. Neither Conditional_Fields nor field_states_ui is working for me.
At first, when the page gets load, all required #states is working but when we click on "add paragraph" then applied #states gets vanish.

chandeepkhosa’s picture

Status: Active » Needs review

This is now working for me in Drupal 9 (hopefully you've upgraded from Drupal 8), I've added details here, take a look and see if it also works for you :)
https://www.drupal.org/project/conditional_fields/issues/2902164#comment...

jeffschuler’s picture

Status: Needs review » Closed (duplicate)