Conditional changeStatus option in a blueprint

Hello,

I’d like to condition the possibility of publishing a page to a field : a user should not be able to change the status of the page until they choose an option in a select field, for example.

Is there an option that I missed? Thanks for the help

The only way to achieve this is via a before hook: http://getkirby.test/docs/reference/plugins/hooks/page-changestatus-before

In that hook, check the value of the field, then throw an Exception if the field doesn’t have the correct value.

Having said that, does it depend on the value of the select field or the fact that the field is filled at all? If the latter, you can just require the field. If a field is required and the user tries to change the status, an error is thrown anyway.

In my case, the field just has to be filled, so it seems requiring it would to the trick. I’ll keep in mind the hook though, that can be handy.

Thanks a lot