craftcms / craftcms/cms

[5.x]: Conditional fields don't work for entry types with multiple tabs

Open
#16,860 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
PHP
Stars
3.6k
Forks
705
Avg merge
1d 5h
Merged PRs (30d)
134

Description

What happened?
Description

I have got a component that has 3 columns like this:

Image

So I need to let the author configure the three different content feeds where the options are:

  • Choose if you want it to be automated or manual
  • If MANUAL, you are presented with the option to choose the posts to display
  • If AUTOMATED, you are presented with the choices to configure what posts to fetch and display.

However, the conditional settings for these fields based on the Feed Type field are not making any changes based on my choices, you'll see in the screenshot below the red ones should be for automated and the green fields should appear for manual feeds:

Image

But, even when I chose an option, it never updates and there's nothing in the console to let me know it's even tried and thrown an error. Notice in the screenshot below, the type is automated, yet I'm just being shown the manual posts field.

Image
Steps to reproduce
  1. Create an entry type with multiple tabs
  2. Add conditional fields within these tabs, using the same field in each so it's duplicated the same field type
  3. Try to use it and see how the conditional field switching fails.
Craft CMS version

5.6.11

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce this in Craft CMS 5.6.11 by creating an entry type with multiple tabs and duplicated conditional fields, as described in the steps. Verify that changing the shared Feed Type updates the visible manual and automated fields; the issue is done when conditional switching works independently across the tabs.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.