F
Filamentβ€’7d ago
BKF Dev

Call Resource Save Changes Button

Hello, How could I call the Save Changes button action from another action button ? Thanks πŸ™‚
4 Replies
BKF Dev
BKF Devβ€’7d ago
Nevermind πŸ™‚
Topherllobrera
Topherllobreraβ€’7d ago
Did you fix it?
BKF Dev
BKF Devβ€’7d ago
Yes, just $this->save()
fenerli
fenerliβ€’7d ago
use Filament\Forms; public function form(Form $form): Form { return $form ->schema([ // Your form fields here Forms\Components\TextInput::make('name')->required(), // Save button Forms\Components\Button::make('save') ->label('Save Changes') ->action('saveAction'), // Another button to trigger save Forms\Components\Button::make('triggerSave') ->label('Trigger Save') ->reactive() ->action(function () { $this->saveAction(); }), ]); } public function saveAction() { // Your save logic here }
Want results from more Discord servers?
Add your server