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:
<h3>{title}</h3>
{if ! show_me} I am hidden!{/if}
{/exp:channel:entries}
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:
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: