craftcms / craftcms/cms

[5.x]: Section does not work within conditional logic within a field

Open
#16,950 4 comments 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 want to hide a field, only when the section is 'company'. The field is still visible in the admin panel, when it's a company.

Steps to reproduce
  1. Add a field type
  2. Add a new label
  3. Inside the label, add a entry condition with a section is not 'companies' ..
Expected behavior

Hide the field when, the section is comapany

Actual behavior

The field is still visible

Craft CMS version

5.6.13

PHP version

8.3

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions
Image

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 the issue in the Craft CMS 5.6.13 admin panel using the listed field, label, section, and entry-condition steps. Start by tracing the conditional field logic for sections, then verify that the field is hidden when the section is companies and remains visible otherwise.

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.