-
Notifications
You must be signed in to change notification settings - Fork 126
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
Toggle field conditionals on frontend don't handle defaults correctly #510
Comments
This happens in EE 6.0.0 too. To set the toggle to off, I have to toggle on then off again. |
When you add a field, there is this note:
which is definitely not true - it does not create new rows in |
…oggle field after adding it and no prompt for update were made
…oggle field after adding it and no prompt for update were made (cherry picked from commit 1d64547)
…oggle field after adding it and no prompt for update were made (cherry picked from commit 1d64547)
Description of the problem
Frontend conditionals don't correctly handle default values for entries that have not been saved with the field.
How To Reproduce
Steps to reproduce the behavior:
Per the cp instructions when creating a toggle field:
Default value
The default position of the toggle switch for this field when publishing new entries.
Note: If assigned to a channel with existing entries, those entries will be assigned this value.
So existing entries should all act as if they were assigned the default value.
Make a new toggle field, set the default to 'on' and assign the field to a channel. Go to edit an existing entry - the toggle field correctly displays as 'on'.
Go make a template:
All existing entries show the 'I am hidden' text. New entries set to 'on' work (nothing shows up) and new entries set to 'off' show the hidden message. But it's incorrectly defaulting for entries that have not been explicitly set to off.
Environment Details:
The text was updated successfully, but these errors were encountered: