F
Filament2y ago
xy

Is it possible to open modal with form fields in hint action?

I've tried but it doesn't open the moda with form (text input):
TextInput::make('name')->live(debounce: 500)->label('name')->hintAction(
Action::make('generate')
->icon('heroicon-o-arrow-path')
->form([
TextInput::make('Keywords')->nullable(),
])->action(function (Set $set) {
// do something
})
)->required()
TextInput::make('name')->live(debounce: 500)->label('name')->hintAction(
Action::make('generate')
->icon('heroicon-o-arrow-path')
->form([
TextInput::make('Keywords')->nullable(),
])->action(function (Set $set) {
// do something
})
)->required()
15 Replies
LeandroFerreira
what is the error? Any console errors?
xy
xyOP2y ago
No errors, button press does nothing
LeandroFerreira
is it a resource? custom page?
xy
xyOP2y ago
Custom page (RegisterTenant)
LeandroFerreira
did you config the mount method?
xy
xyOP2y ago
Not configured mount, this is just in form(Form $form) function
LeandroFerreira
is the action a Filament\Forms\Components\Actions\Action ?
xy
xyOP2y ago
Yes
xy
xyOP2y ago
Its a custom page which extends RegisterTenant. Rest of the form is working as aspected, The action works as long as no ->form is appended to it. But when ->form([...fields]) is appended, it stops working. @Leandro Ferreira Are you able to recreate the action without issue on your end with this code?
LeandroFerreira
It was supposed to work
xy
xyOP2y ago
bug?
LeandroFerreira
probably not
xy
xyOP2y ago
not sure what else it could be any ideas? bump
LeandroFerreira
GitHub
External page and Select::createOptionForm · filamentphp filament ·...
Hello, I'm using a Select with createOptionForm in RegisterTenant and EditTenant. It's working pretty well in edit page but not in register page, the modal doesn't appear. I don't k...

Did you find this page helpful?