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?
and field on the form right now
and field on the form right now
Actions\Action::make('status.confirm')
->button()
->action(function () {
if ($this->record->status == OrderStatus::PAID) {
$this->record->status = OrderStatus::CONFIRMED;
$this->record->save();
}
}), Forms\Components\Select::make('status')
->reactive()
->required(),