sweetplum
what UI Kit (framework) does Filament use?
I saw Dan mentioned that Filament (V2) was built with a tailwind UI kit in one of his tutorials, but can't recall what it is. Is it still true for V3? want to try it with other parts of the same site to be consistent.
5 replies
$set another form field, but the new value of that field is not showing in $data array
On the edit form, there is one reactive field. when this field is changed by user, it will $set other several fields' value. On UI, I do see values of those fields are changed. but when
dd($data)
in mutateFormDataBeforeSave(array $data)
those fields are not presented. Here is the partial form:
. so in the $data
, I can see $data['summary_data']['total_remittances'], but there is no$data['summary_data'] ['difference']. thus it failed to save the new value for ['difference']. Is there anything wrong with the above code? thx!2 replies
adding table filter in action->url()
On a ViewRecord page, I have an action button to open url to another resouce's ListRecord page but with a particular table filter preset. I did like the following:
. It works. Is there a better or proper way to achieve it? Thanks.
3 replies
how to load relationship() on Forms\Components\Fieldset conditionally?
The form uses
Forms\Components\Fieldset::relationship('primaryAddress')
to load a related 'address' record of an user. but sometimes the user may not have the related address yet. In this case, it shows Target [Illuminate\Database\Eloquent\Model] is not instantiable.
error. Is there an way to load the related 'address' record condtionally?
I tried , but I still get the error. thank you for your insights.2 replies
Do not save or exclude Fieldset->relationship() when saving a form?
I have a long form() in one resource page. I used
Fieldset->relationship()
to load a related rocord and added a custom action so users can update the related record in a modal. Since it is a part of the long form, when the form is 'saved', Filament tries to save the related record as well. How can I exclude the related record when saving the form as the users can update/edit the related record in a modal? I tried to handleRecordUpdat
on the edit page, which doesn't seem to work. Thanks in advance.2 replies
How to refresh related record on a resource page?
on my resource page, I use
Fieldset
compnent to load a relationship. I can click an action button 'update' to open a modal form to update the related record. I do this way so I can call an existing form schema to populate the modal form so I don't need to repeat all those form fields in the modal->form(). but I couldn't figure out how to refresh the main form with updated related record. Ideally it should only refresh the related record section. but if is not doable, refresh the entire page is also acceptable. any suggestions? thanks.2 replies