How to modify the form opened from a select option?

E.g I want to adjust the form columns to two, by default it's one. I don't want to use Grid components everywhere.

Is there a way of modifying the
form
from within editOptionAction?
Select::make()
  ->editOptionForm(CustomResource::getFormSchema())
  ->editOptionAction(fn (Forms\Components\Actions\Action $action) => $action->modalWidth('screen'))
Solution
I found what I needed - you use Closure in editOptionForm to access the form object.

->editOptionForm(fn (Forms\Form $form) => $form
    ->schema(CustomResource::getFormSchema())
    ->columns()
)
Was this page helpful?