F
Filamentβ€’4mo 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β€’4mo ago
Are you using \Filament\Pages\Page::stickyFormActions(true) ?
Gediminas
Gediminasβ€’4mo ago
Is this resource specific? Where do I use it?
LeandroFerreira
LeandroFerreiraβ€’4mo ago
AppServiceProvider if you want to apply it to all pages
Gediminas
Gediminasβ€’4mo ago
I would like to apply it to a specific resource if that's possible
Solution
LeandroFerreira
LeandroFerreiraβ€’4mo ago
Add this to the CreatePage/EditPage.
public static bool $formActionsAreSticky = true;
public static bool $formActionsAreSticky = true;
Gediminas
Gediminasβ€’4mo ago
Nice, works great! Thanks!
Gediminas
Gediminasβ€’4mo ago
Although, I haven't seen this mentioned anywhere in the docs - did I miss something or is it a hidden feature? πŸ˜„
LeandroFerreira
LeandroFerreiraβ€’4mo ago
you can send a PR πŸ‘
Oddman
Oddmanβ€’3mo 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β€’3mo ago
Open a new topic and share the problem please