Modal File Upload for Widget Buttons
I'm developing a board with multiple widgets, including tables. One widget links to a resource where users can upload files and metadata on a new page. I'm exploring the possibility of creating a button that opens a modal for the same purpose within the widget. While the button exists, it's uncertain if it can be linked to an action that opens a modal.
Solution:Jump to solution
To create an Action that opens a modal with a file upload field, you can do something like this:
```php
Actions\Action::make('upload')...
2 Replies
Solution
To create an Action that opens a modal with a file upload field, you can do something like this:
Yeah, I think that the point was that I did not know how to define the buttons. So in the page I added them using the
getHeaderActions function. And indeed returned the Action and that worked. Nice to know it needs to be a create action to work π