giapele
giapele
FFilament
Created by giapele on 10/28/2024 in #❓┊help
select items render html
I want to add color to select items i have make this but it displays the css as text and the html() is not define for select this is my code. Any Ideas?? Select::make('leads_status_id') ->label(__('labels.status')) ->relationship('status', 'name', fn ($query) => $query->orderBy('sort_order')) ->preload() ->options(function () { return LeadsStatus::all()->mapWithKeys(function ($status) { return [ $status->id => "<span style='color: {$status->color};'>{$status->name}</span>", ]; })->toArray(); }) ->searchable() ->required(),
2 replies
FFilament
Created by giapele on 9/28/2024 in #❓┊help
nested repeater with forms Actions Component
I have this stracture and I can't retrieve the cardId on the Action AssignUsers. The record has tasklist model and the arguments is empty. Can Anybody help Repeater::make('Tasklists') ->relationship('tasklists') // Tells Filament this is a relationship ->schema([ Repeater::make('Cards') ->relationship('cards') // Tells Filament this is a relationship ->schema([...]) ->extraItemActions([ Action::make('editCard') ->mountUsing(function (Forms\ComponentContainer $form, $record, array $arguments) { preg_match_all('/\d+/', $arguments['item'], $cardId); $cardId = $cardId[0][0]; ... ]); ->form([ Split::make([ Section::make([ ...
]), Section::make([ Actions::make([ Action::make("Assign Users") ->form([ TextInput::make('name'), ... ]) ->mountUsing(function (Forms\ComponentContainer $form, $record, array $arguments) { }) ]) ])->grow(false), ]) ])
]) ])
3 replies
FFilament
Created by giapele on 9/26/2024 in #❓┊help
nested repeater extraItemActions
I have 2 nested repeaters and on the second I have extraItemActions and I have mountUsing and the $record for somereason is the data from the parent repeater and not the child here is the code: Repeater::make('Tasklists') ->relationship('tasklists') ->schema([ TextInput::make('name') ->label('Tasklist Name') ->required(), Repeater::make('Cards') ->relationship('cards') ->schema([... ]) ->extraItemActions([ Action::make('editCard') ->icon('heroicon-o-pencil') ->mountUsing(function (Forms\ComponentContainer $form, $record) { log::info('', ['record' => $record]); }) ->action(function ($record, array $data) { ... }) ->form([... ])
]) ])
->label('Cards') ->addActionLabel('Add New Card'), ]) ->columnSpan('full') ->grid(5) ->addActionLabel('Add New Tasklist'), ]) if I log $record->cards I get all cards but i don't know the id of the card I am currently editing
5 replies
FFilament
Created by giapele on 9/26/2024 in #❓┊help
Filament repeater pop up
I have a filament repeater and i want to open a popup to show more details about the card. I prefer not to use blade file and achieve it with built in filament functionality. Can someone help me?
6 replies