How can I update a form input on action?

I have action button on edit page and would like to update a particular input on edit form. How can I do this?

 Actions\Action::make('status.confirm')
                ->button()
                ->action(function () {
                    if ($this->record->status == OrderStatus::PAID) {
                        $this->record->status = OrderStatus::CONFIRMED;
                        $this->record->save();
                    }
                }),


and field on the form right now

                    Forms\Components\Select::make('status')
                        ->reactive()
                        ->required(),
Was this page helpful?