igmltd
igmltd
FFilament
Created by igmltd on 6/24/2024 in #❓┊help
Call getFormActions() in section?
I moved the form actions (save changes & cancel) to a Section "footerActions" by copying the actions from the getSaveFormAction() and getCancelFormAction() methods found in Filament\Resources\Pages\EditRecord; Code below, feels abit hacky to me - just wondering if theres a way to call it and return it directly from getFormActions() or something? Is there a a better way? public static function form(Form $form): Form { return $form->schema([ Section::make('Member City ') ->columns(2) ->schema([ Forms\Components\TextInput::make('name') ->required() ->maxLength(50), ])->footerActions([ Action::make('save') ->label(__('filament-panels::resources/pages/edit-record.form.actions.save.label')) ->submit('save') ->keyBindings(['mod+s']), Action::make('cancel') ->label(__('filament-panels::resources/pages/edit-record.form.actions.cancel.label')) ->alpineClickHandler('document.referrer ? window.history.back() : window.location = "/admin/fellow"') ->color('gray') ] ) ]); }
5 replies
FFilament
Created by igmltd on 6/23/2024 in #❓┊help
Tailwind color scale
Hi, reading the docs I have understood that all the colors and scales are available in filament, so do I do something like this to use scales: Color::Red[500] ? Thanks in advance
2 replies
FFilament
Created by igmltd on 6/15/2024 in #❓┊help
Add form to list view
Hi, is it possible to add a form to a list view, i want to add it ontop of a table? Thanks
7 replies