Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.x]: Fields with duplicate labels no selectable for entry conditions #15764

Open
Dollhopf opened this issue Sep 19, 2024 · 0 comments
Open
Labels

Comments

@Dollhopf
Copy link

Dollhopf commented Sep 19, 2024

What happened?

Description

When 2 (or more) fields have the same label (but different handle), only the first one can selected under Settings>Entry Condition>Add a rule. If a condition is selected with different labels and afterwards renamed to a duplicate label, the dropdown shows both correctly (see Expected behavior). Switching or deleting the condition results in the initial state with only one field showing (see Actual behavior).

Steps to reproduce

  1. Create a field layout with two fields of the same type and lable but different handle.
  2. Save entry to make the fields available vor Entry Conditions.
  3. Add a third field.
  4. Go to Settings>Entry Condition>Add a rule.

Expected behavior

Both fields should show independently, even if they have the same label.

Currently this is only true if the condition was set before renaming the field with the condition on it:
image

Actual behavior

The second field with the same label is missing in the selection dropdown.
image

Craft CMS version

5.4.4

PHP version

8.3

Operating system and version

Windows 11, Firefox 130.0

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

None

@Dollhopf Dollhopf added the bug label Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant