Arjen
Dynamic ExportColumns based on JSON field in Exporter, possible?
Hi, is it possible to define extra dynamic export columns based on a JSON array from a owner record in a relation manager? My use case: I've got a Course resource with a CourseRegistration (HasMany) relation manager. The Course resource contains a Builder field that is used to insert extra form fields for when people sign up for a course. For example:
When a person fills in the sign up form, the extra fields get saved in CourseRegistration in a DB column like so:
I've added an Exporter to the CourseRegistration relation manager, and I want to create extra columns for every extra form field, so that the csv/xlsx for all signups doesn't contain one column with above data. Is this possible? Is there a way to get a hold of the owner record inside the
public static function getColumns()
method inside an Exporter? Basically I need a way to pass the owner record to the exporter class.6 replies
GRecaptcha field disappears on livewire/update in a Livewire Component, but not in Panel Resource
I've implemented the Captcha field in a Livewire Component, but after doing the captcha or saving the form, the captcha disappears. It seems
wire:ignore
here is not respected. The weird thing here is when I place this Captcha field inside a panel resource form, it works correctly and does not disappear. I've tried moving the wire:ignore
but it's not working. I could really use some assistence here.
6 replies
How to get infolist in ViewAction modal in table widget?
I've created a table widget and I'd like to get the infolist I defined in the resource for this specific model to show up when I view the record (which opens in a modal on both the resource and this table widget). I've tried adding the infolist method, but there nothing appearing inside the model. What am I missing?
6 replies
Different configuration for Actions inside ActionGroup possible?
Is it possible to change the configuration of an
Action
with configureUsing()
if that action is inside an ActionGroup
? My goal is to have all actions be shown as an ->iconButton()
, but not if they're wrapped inside an ActionGroup
.4 replies
$this->form->getState() empty
Hi, I've created a Filament page with the make command and I've placed a form inside the component. When I submit my form,
$this->form->getState()
returns an empty array and I'm not sure why. The $data property however is filled correctly, and my validation also runs fine. Any idea what's wrong with my code? Or shouldn't I use $this->form->getState()
and just use $this->data
?
My file:
5 replies
Wizard loses $_GET param after next step
$this->getOrganizationFormComponent()
return Filament\Forms\Components\Wizard
component. Without the ternary in the form method, clicking next works, but with the ternary and type 'organisatie' in the url, clicking next results in the default type and the form glitches because of it. How can I make sure it returns the next step correctly?5 replies
Table column loses data when sorting by relationship
I have the following relation
Booking
-> HasMany -> Dayparts
where Dayparts
has a field date
. I want to sort courses by the first child in Dayparts
and while the code for that sorts the items in the table correctly, the data in the sorted column in the table just disappears. When the table is not sorted, the date is showing correctly. Any idea what I'm doing wrong? This is the table column in the BookingResource
:
I tried changing 'dayparts.0.date'
to 'date'
as well, but that changes nothing.3 replies
Convert Filament::registerScripts
Hi, how do I convert the following piece of code from v2 to v3
FilamentAsset
? I want to use the compiled code at public/build/assets/app-fdfe8a8c.js
(for example) instead of the source in resources/js/app.js
5 replies
Best way to include script
Hi, I've registered a custom script like this:
This works, but running
php artisan filament:assets
produces the following type error Filament\Support\Assets\Asset::getPath(): Return value must be of type string, null returned
...5 replies
Programmatically select a tab
Is it possible to programmatically select a tab? I have two tabs but based on a radio field, the first tab may get hidden. If that tab is selected, the other one doesn't automatically get selected so you'll only see the second tab (inactive) without the tab content.
2 replies
Error when prefilling from query string in resource with persistTabInQueryString enabled
Hi, I get the following error when persisting tabs in query string enabled when creating a form or uploading files inside the form: https://flareapp.io/share/xPQ3Xol5#F113
The query strings looks like this:
?event_start=2023-03-04&event_end=2023-03-04&tab=tabs-evenement-tab
, and the code for filling like this (not sure if it is the correct way to handle it):
11 replies