F
Filamentβ€’2mo 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 DevOPβ€’2mo ago
Nevermind πŸ™‚
Topherllobrera
Topherllobreraβ€’2mo ago
Did you fix it?
BKF Dev
BKF DevOPβ€’2mo ago
Yes, just $this->save()
fenerli
fenerliβ€’2mo 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