"anonymous" actions to a form but only on edit?
I have a form for creating/editing articles. I want to add a "preview" button that just loads the url..
Is it possible to tell the action to not display if it's on the create page? Or when $state['slug'] is empty?
2 Replies
Simple solution, only add the action to the EditArticle class.
Otherwise ‘->hidden(fn($context) => $context === ‘create’)`
I think actions support context.
->hidden
did the trick. Thanks