[6.x] Revealer field conditions not working with "Toggle" UI mode
Bug description
When using a Revealer field with the UI mode set to Toggle, the field conditions are not applied. Fields that should be displayed based on the Revealer’s state remain hidden. No issues with the Button mode.
How to reproduce
- Create a Revealer field.
- Set its UI mode to Toggle.
- Add another field with a condition depending on the Revealer’s state.
- Switch the Revealer toggle.
Here's my Blueprint:
title: Page
tabs:
main:
display: Main
sections:
-
display: 'New Section'
fields:
-
handle: title
field:
type: text
required: true
-
handle: replicator
field:
type: replicator
display: Replicator
sets:
new_set_group:
display: 'New Set Group'
sets:
new_set:
display: 'New Set'
fields:
-
handle: revealer
field:
type: revealer
display: Revealer
-
handle: text_field
field:
type: text
display: 'Text Field'
if:
revealer: 'equals true'
-
handle: textarea_field
field:
type: textarea
display: 'Textarea Field'
if:
revealer: 'equals true'
-
display: 'New Section'
fields:
-
handle: another_revealer
field:
mode: toggle
type: revealer
display: 'Another Revealer'
-
handle: date_field
field:
type: date
display: 'Date Field'
if:
another_revealer: 'equals true'
sidebar:
display: Sidebar
sections:
-
fields:
-
handle: slug
field:
type: slug
localizable: true
validate: 'max:200'
Logs
Environment
Version: 6.0.0-alpha.1
Installation
Fresh statamic/statamic site via CLI
Additional details
No response
This doesn't seem completely fixed on alpha 3. I notice revealers don't work still. Perhaps it's due to nesting? I think I have replicator > replicator > grid.
You can see it in the Peak install when you go to the homepage. Open up the page builder, hit cards. Check a card and then try to alter the button properties.
~~Just here to inform this would cause an issue on all Peak sites as they use this pattern in the button fieldset. So this could potentially be a big issue for folks.~~
Nevermind, I had already commented above I see now :-)