SLy
How can I get current active form tab in a EditResource page?
I use the tabs layout for a form https://filamentphp.com/docs/3.x/forms/layout/tabs, I want to get current active tab so I can use it inside the getRedirectUrl method for the EditResource.
4 replies
Faded inactive action links based on Policy
Can I display default action links (View, Delete) as inactive, with a custom faded style if they are not authorized via policy? By default they are not displayed at all and I would like to keep the visual consistency for the Actions column.
7 replies
View title of a modal infolist
The offers are inside a relation manager having Customer as parent, when I click view on the offer I need to change the title of the modal that is opened for the infolist defined inside the Offers relation manager? I want to modify the default "View offer" label that is set by default when I open the infolist modal, I could not find any method in docs to do that.
6 replies
money() format on Infolist
How to remove trailling .00 from money() format on Infolist?
Infolists\Components\TextEntry::make('price')
->label('Price')
->translateLabel()
->money(config('settings.currency'))
->color('secondary'),
So I would like 250.00 to show as 250, but 250.12 should keep decimals.4 replies
Spatie Translatable relation manager locale
use Translatable;
#[Reactive]
public ?string $activeLocale = null;
Does not seem to inherit the locale of the Translatable resource page that the relation manager is being displayed on as state here https://filamentphp.com/plugins/filament-spatie-translatable#inheriting-the-relation-managers-active-locale-from-the-resource-page5 replies
Translatable multiselect
I have a multiselect with spatie translatable, but when I change language, the values are not translated and I get console error: Uncaught (in promise) Could not find Livewire component in DOM tree in select.js
Forms\Components\Select::make('transportTypes')
->relationship('transportTypes', 'name')
->getOptionLabelFromRecordUsing(fn (TransportType $transportType) => $transportType->name)
->preload()
->multiple()
->columnSpanFull(),
1 replies
Setting default value in input with createOptionForm
The ->default(fn (Get $get): ?int => $get('state_id')) in following code returns $get('state_id') as null, even though I select a value in state_id select, how can I prefill an input in the create createOptionForm modal with the value from another form field?
4 replies
Html validation with save on multiple tabs
I have 3 tabs in a resource, last tab has a repeater. If I add new item in repeater with required fields, then switch tabs and use the save button, form does not save because I have required html fields in previously opened tab and get: "An invalid form control with name='' is not focusable." in console.
6 replies