Conditional rules not working
Hi, I want to enable custom rules conditionally, but this is not being called. What am I missing here? I have attached the code used below.
``` Forms\Components\Select::make('identification_type')
->label(__('Identification type'))
->options(IdentificationType::class)...
Hide button create & cancel on wizard
hello all, does anyone know how to hide this button on wizard?
Solution:
Follow this as mentioned in here https://filamentphp.com/docs/3.x/panels/resources/creating-records#using-a-wizard
Calling a Method Inside a Field Class in Filament v3 from JS
I've implemented a JavaScript function to add a new item to an array of coordinates. When clicking the button, I'm calling @this.call('add'), but it doesn't seem to find the add method in the Form class, even though the method exists inside the Field. How can I use the add method that is defined within the Field class?
```
class TestForm extends Component implements HasForms
{...
multiple resources based on same model
i have a users table with a role field.
I want to have two resources clients and admins that both use the same table users but with a filter for the role field.
how do i achieve this?...
Solution:
You can use
->modifyQueryUsing()
and apply differently per resource https://filamentphp.com/docs/3.x/panels/resources/listing-records#customizing-the-table-eloquent-querySpatie Media File Upload Issue
Hello, Does anyone know how to "insert" image into form. I have this action witch is getting view from Livewire component. And livewire component itself has forms which contain Spatie Media Library. Now the issue is i cannot get that fileupload to attach and preview image.. Any solution?
edit page
I have created a resource in another panel, but it's not appearing in the navigation menu of that panel.
I don't have any policies in the models.
I have tried
```php
protected static bool $shouldSkipAuthorization = true;...
Sticky header inconsistency with logo
How do I avoid this?
Solution:
ah its because of the debugbar taking up space
SelectFilter unique/distinct relationship value
I have a table of tickets that belong to a location. Some locations are in the same city. How can I use a SelectFilter to get a unique list of cities from the locations table to filter the tickets? This is my code so far:
```php
Tables\Filters\SelectFilter::make('location.city')
->label('City')...
Executing TailwindCSS in InfolistBuilder / custom entry.
Hey guys I have installed the panel builder and I have the following infolist:
public static function infolist(Infolist $infolist): Infolist
{
return $infolist->schema([
Section::make()...
Solution:
you need to create a custom theme
https://filamentphp.com/docs/3.x/panels/themes#creating-a-custom-theme...
Filament Tables - listwithlinebreaks() - what am I doing wrong?
Hi my table column definition is like this:
```
Tables\Columns\TextColumn::make('filename')
->searchable()...
Solution:
->listWithLineBreaks()
is for array dataApply ->translateLabel() everywhere
Hi All,
Is it possible to apply
->translateLabel()
on every Entry/Column in Forms, Tabel and Infolist?
I need to translate everything but don't want to add the field manual.
...Solution:
yes, use
configureUsing
in your provider
```php
Field::configureUsing(function (Field $field) {
$field->translateLabel();...SpatieFileUpload data not getting with getState()
I have custom page in filament
...
use Filament\Pages\Page;
class CareerApplyJob extends Page
use Filament\Pages\Page;
class CareerApplyJob extends Page
Linking Multi relationships
Hello
I am working on an app that is used for Performance Management, so one of the requirements is each employee position must have kpas linked to it with custom score for each position then each kpa has many kpis which also have a score.
So currently I have the position displaying and the position kpas, displaying in a relationship manager, now I want when I click on each position kpa that is showing in relationship manager to be able to add kpis for that selected kpa....
Group options of a CheckboxList
Basically, I have an array with a lot of items, and I want the user to be able to choose multiple of them, and Select input works well, but its not that good with selecting multiple options at once
So I am trying to use CheckboxList, which looks really promising, only downside is that it does not have a group functionality...
How to change the color of buttons
Hi second time i am asking this question how i can change the color of the buttons, i want to change the on the create resource second button it does not have the specific class it was just added filament classes how i can fix these problem
Select Component Lazy Loading though API
I use external API as the source of options for my select component.
Is there anyway to make it support the pagination of the api? which means load more data once the user scrolled to the end of shown records? either by auto calling the api and pass param page=1/2/3.. or the user click on show more button or smth' similar?
My current code:...
Table Actions on Columns
Hi fellas I am having an issue with triggering action, I have custom columns that i passed view. In that view i have some details and button to trigger "more-details" in my case is "vidi detalje". But it wont work in any way. Only works on the right side as classic table action. I have also tried to setup custom action other than table but it has no effect it wont redner that action.
Filtering select options on-fly
I've been working on a feature where I have a select field and based on the first selection I chose, I want the form to dynamically filter out options I have.
Current concept works on filtering by first selection entity dimensions, for example, if I make a choice of 600x400, I want options to re-render with options that have the same size of 600x400.
I've tried to set Select form input as
live()
/reactive()
, added a relationships' modifyQueryUsing
closure to do the filtering which yields a correct query after dumping it and I have tried to set it in ->options(...
by using closure. But nothing really seems to work as options are not updating.
...Solution:
Ok, I found that Select isn't the best option here. If I make this for
CheckboxList
instead, it can properly re-render available options as my intention was. Don't think that Select
is really capable of that without re-opening it.Nested modal
I'm new in Filament and try to create nested modal example but I didn't know how to apply the action.
In the following example, I try to open a form in modal if the user chooses (with review) option.
You support is highly appreciate....
Native DateTimePicker
I would like to format the native date time picker displayed value. But the same formatter as on the non native date time picker not working. Can anyone faced this before?