jamesro
jamesro
FFilament
Created by jamesro on 2/14/2025 in #❓┊help
Wizard step afterValidation get only form fields of that step only
Hello, when i use ->afterValidation(function (array $state) { } on a wizard step, it will bring me complete form fields, and that's not good because each wizard step is part of a diferent entity, and those entities have some fields named the same, and I can't rename them unfortunately, is it possible to get inside the afterValidation only fields of that step?
3 replies
FFilament
Created by jamesro on 2/12/2025 in #❓┊help
Wizzard multiple entities per each wizzard step
Hello, I have a case where I need a wizzard with several steps, but I need for each step of the wizzard to edit a different model and corresponding record for that model, any idea if it's possible to achieve that?
7 replies
FFilament
Created by jamesro on 2/10/2025 in #❓┊help
Custom table query, lost when i'm using custom filters,
For some reason when I use some filters on my table, the query for that filter is loosing the main query of the table, am I doing something wrong or I've understood wrong how filters queries works?
5 replies
FFilament
Created by jamesro on 2/6/2025 in #❓┊help
How to change the order of navigation group sub-items
Is it possible to change the order of sub-items of a navigation group? i'd like to move some sub-items position
15 replies
FFilament
Created by jamesro on 1/31/2025 in #❓┊help
horizontal navbar dropdown sub-items in column
Hello, Is it possible so thant when filmanentPHP horizontal navbar dropdown items to be split in column? I have a menu item who has many sub-items and it gets too long, was thinking if there's a way to make them go in multiple columns?
3 replies
FFilament
Created by jamesro on 1/29/2025 in #❓┊help
Set css class per repeater item
Hello, Is it possible to set a custom css class per each repeater item using a closure ?
seems the extraAttributes sets it per whole repeater and not per item Thanks
11 replies
FFilament
Created by jamesro on 11/17/2024 in #❓┊help
How to set tenant when changing tenant ( Team ) from filamentphp tenant menu?
Hello, Can can I set filament current tenant when a user changes the Team using filament tenant menu? Regards
2 replies
FFilament
Created by jamesro on 11/5/2024 in #❓┊help
Custom page with table and filters
Hello, I'm having an issue with my custom page where I use a table and table filters, for some reason the applied filters does not end up into my url Here is how I use it: ```php class Planning extends Page implements HasForms, HasTable { use InteractsWithTable; use InteractsWithPageFilters; use InteractsWithForms; public static function table(Table $table): Table { return $table ->query(Planning::all()) ->filters([ Filter::make('year') ->columns(2) ->form([ Select::make('year') ->label('Select year') ->options( collect(range(date('Y'), date('Y') - 10)) ->mapWithKeys(fn($year) => [$year => $year]) ->toArray() ) ->searchable(), ]) } the filters do get applied, but I don't see the active filters applied in my page url Any help would be appriciated. Thanks
5 replies
FFilament
Created by jamesro on 10/17/2024 in #❓┊help
Relation manager with pivot table doesn't show pivot table field values when edit
Hello, I have these relation on my User and Cars entities: User entity:
public function cars(): BelongsToMany
{
return $this->belongsToMany(Cars::class, 'user_cars', 'id_user', 'id_car')
->withPivot([
'data_start', 'data_end', 'disabled'
]);
}
public function cars(): BelongsToMany
{
return $this->belongsToMany(Cars::class, 'user_cars', 'id_user', 'id_car')
->withPivot([
'data_start', 'data_end', 'disabled'
]);
}
Car entity:
public function owners()
{
return $this->belongsToMany(User::class, 'user_cars', 'id_car', 'id_user')
->withPivot('data_start', 'data_end', 'disabled');
}
public function owners()
{
return $this->belongsToMany(User::class, 'user_cars', 'id_car', 'id_user')
->withPivot('data_start', 'data_end', 'disabled');
}
Unfortunately, both my User entity and user_cars pivot table have these 3 colums on them: 'data_start', 'data_end', 'disabled' Now when i try to edit an entry from user_cars using my relation manager, those 3 columns values does not get the values from the db, it works if I rename columns to something else in my pivot table: This is relation manager form:
Forms\Components\DateTimePicker::make('data_start')
->required(),
Forms\Components\DateTimePicker::make('data_end')
->required(),
Forms\Components\Toggle::make('disabled')
->inline(false)
->required(),
Forms\Components\DateTimePicker::make('data_start')
->required(),
Forms\Components\DateTimePicker::make('data_end')
->required(),
Forms\Components\Toggle::make('disabled')
->inline(false)
->required(),
any how to make it work without having to rename those columns in my pivot table?
2 replies
FFilament
Created by jamesro on 10/9/2024 in #❓┊help
dynamic repeater fields names
Hello, is it possible to make the repeater fields names dynamic? something like:
Repeater::make('recuperare_invoire')
->label('Recuperare Invoire')
->schema([
Grid::make(3)->schema([
DatePicker::make('data_recuperare_invoire'.$numberOfRepeaterItem)
->label(fn ($get, $statePath) => 'Data Recuperare ' . (intval(str_replace('.', '', $statePath)) + 1))
->required()
->native(false),

TextInput::make('recuperare_ore_invoire'.$numberOfRepeaterItem)
->label(fn ($get, $statePath) => 'Numar de Ore ' . (intval(str_replace('.', '', $statePath)) + 1))
->default(2)
->numeric()
->step(0.5)
->required(),

TextInput::make('recuperare_interval_invoire'.$numberOfRepeaterItem)
->label(fn ($get, $statePath) => 'Interval Recuperare ' . (intval(str_replace('.', '', $statePath)) + 1))
->required(),
]),
])
Repeater::make('recuperare_invoire')
->label('Recuperare Invoire')
->schema([
Grid::make(3)->schema([
DatePicker::make('data_recuperare_invoire'.$numberOfRepeaterItem)
->label(fn ($get, $statePath) => 'Data Recuperare ' . (intval(str_replace('.', '', $statePath)) + 1))
->required()
->native(false),

TextInput::make('recuperare_ore_invoire'.$numberOfRepeaterItem)
->label(fn ($get, $statePath) => 'Numar de Ore ' . (intval(str_replace('.', '', $statePath)) + 1))
->default(2)
->numeric()
->step(0.5)
->required(),

TextInput::make('recuperare_interval_invoire'.$numberOfRepeaterItem)
->label(fn ($get, $statePath) => 'Interval Recuperare ' . (intval(str_replace('.', '', $statePath)) + 1))
->required(),
]),
])
4 replies
FFilament
Created by jamesro on 10/8/2024 in #❓┊help
HasManyThrough for select field
Hello, Select field is not compatible with HasManyThrough ? Any way to make it work? i have
public function categorii()
{
return $this->hasManyThrough(Categorii::class, NecesareCategorii::class, 'id_necesar', 'id', 'id', 'id_categorie');
}
public function categorii()
{
return $this->hasManyThrough(Categorii::class, NecesareCategorii::class, 'id_necesar', 'id', 'id', 'id_categorie');
}
But in my select field when I select and save the record, doesn't seems to be creating the relation
3 replies
FFilament
Created by jamesro on 10/2/2024 in #❓┊help
FileUpload on relation ( HasOne) extra parameters
Hello, I have a case where the i have a file() relation to another File entity, and that file entity has some extra fields required Any way i can pass those extra fields values need, when I save my form?
7 replies
FFilament
Created by jamesro on 10/2/2024 in #❓┊help
How can I hide a field inside a form or repeater, but still send its data
How can I hide a field inside a form or repeater, but still send its data ( i'm populating it's data from another field ) I've tried with hidden() and visible() but it seems its data is not sent when I submit the form Regards
4 replies
FFilament
Created by jamesro on 10/1/2024 in #❓┊help
Showing a modal with list of order products
Hello, I'm trying to show the list of the order products inside a modal using table, I've created a livewire component where I pass my order it and from there in my livewire component table i set a query to bring me a table with order products, All good until i change orders page number, in the opened modal for some reason instead of starting from page number 1, it start from page set in my current orders table. Any idea how i can fix this ?
2 replies
FFilament
Created by jamesro on 9/25/2024 in #❓┊help
Add roles / permissions per team for user
No description
33 replies