How to add custom action button on edit modal form

How to add a custom button on the edit form? (modal)?
No description
Solution:
Got it! ->extraModalFooterActions(function($record) {...
Jump to solution
5 Replies
wazkaz
wazkaz5w ago
use the ->extraModalFooterActions()
justanotherC
justanotherCOP5w ago
Thanks this is a step in the right direction. Any options to combine this with the record? fn($record) Im trying the following:
->extraModalFooterActions([

Action::make('open documentation')
->label('Open documentatie') //
->url(fn($record) => 'https://somesharepoint/Order_' . $record->ordernummer . '/Forms/AllItems.aspx')
->icon('heroicon-o-folder-open')
->color('success')
->openUrlInNewTab(),
])
->extraModalFooterActions([

Action::make('open documentation')
->label('Open documentatie') //
->url(fn($record) => 'https://somesharepoint/Order_' . $record->ordernummer . '/Forms/AllItems.aspx')
->icon('heroicon-o-folder-open')
->color('success')
->openUrlInNewTab(),
])
wazkaz
wazkaz5w ago
What do you mean about combine with the record? The code you sent looks good.
justanotherC
justanotherCOP5w ago
Getting the error: Typed property Filament\Forms\Components\Actions\Action::$component must not be accessed before initialization
Solution
justanotherC
justanotherC5w ago
Got it! ->extraModalFooterActions(function($record) {
Want results from more Discord servers?
Add your server