Disable or enable fields depending on status of page

Good morning

in my blueprint I have several toggle fields. What I want to achieve is that in unpublished and unlisted state of the page, these fields can be changed. Once the page is in published status, these toggles should be visible but not be changeable.

Is that possible with Kirby methods?

Thanks
Andreas

You would have to disable them conditionally, but the disabled prop does not accept Kirby query language by default. So you would have to create a new field that extends the toggle field and make this possible, see Dynamic default number field