F
Filamentβ€’10mo ago
Gediminas

Sticky form buttons

Is there a way to make form buttons at the bottom sticky and always be on screen even if the user has not scrolled all the way down?
Solution:
Add this to the CreatePage/EditPage.
public static bool $formActionsAreSticky = true;
public static bool $formActionsAreSticky = true;
...
Jump to solution
10 Replies
LeandroFerreira
LeandroFerreiraβ€’10mo ago
Are you using \Filament\Pages\Page::stickyFormActions(true) ?
Gediminas
GediminasOPβ€’10mo ago
Is this resource specific? Where do I use it?
LeandroFerreira
LeandroFerreiraβ€’10mo ago
AppServiceProvider if you want to apply it to all pages
Gediminas
GediminasOPβ€’10mo ago
I would like to apply it to a specific resource if that's possible
Solution
LeandroFerreira
LeandroFerreiraβ€’10mo ago
Add this to the CreatePage/EditPage.
public static bool $formActionsAreSticky = true;
public static bool $formActionsAreSticky = true;
Gediminas
GediminasOPβ€’10mo ago
Nice, works great! Thanks!
Gediminas
GediminasOPβ€’10mo ago
Although, I haven't seen this mentioned anywhere in the docs - did I miss something or is it a hidden feature? πŸ˜„
LeandroFerreira
LeandroFerreiraβ€’10mo ago
you can send a PR πŸ‘
Oddman
Oddmanβ€’9mo ago
Yeah this doesn't seem to work all that well, maybe that's why it's not documented? I see it sticky at the top, but soon as I scroll down it disappears.
LeandroFerreira
LeandroFerreiraβ€’9mo ago
Open a new topic and share the problem please
Want results from more Discord servers?
Add your server