Adding an action to a form in a livewire component not working
I have a livewire component with a form on it. I want to add a delete button, which I feel like should be pretty straight-forward. I see in the docs that I can add an anonymous action, but it's not clear on where I put it? Maybe this is obvious to others, but I've tried a few things: adding it to the mount method, using
How can I add an action button to a form (not a field) on a livewire component? I just want a simple delete button with a confirmation modal.
This is my form if it's helpful:
the action I'd like to add:
registerActions method on my form. I've tried following the instructions on adding it to a livewire component, including adding {{ $getAction('myaction') }} to the blade file, but that gives an error of Undefined variable $getAction.How can I add an action button to a form (not a field) on a livewire component? I just want a simple delete button with a confirmation modal.
This is my form if it's helpful:
the action I'd like to add:
