morty
Is it possible to pass the parent record to the gate of a relation manager?
I have a
Work Orders
resource and on the edit page of each is a relation manager for Work Order Notes
. I have policies for both models.
I only want to allow a work order note to be created on work orders that the logged in user owns. The problem is that Filament checks a create
method on the WorkOrderNotePolicy
that doesn't pass in anything other than the user. Eg.
Is there a way that I can pass in the parent/owner record to this method on the policy?6 replies
Has anyone successfully parsed the rich editor/trix field from the raw data in the database?
I have an application that has used the trix editor for a while. I need to migrate this data to a new application that also uses the trix editor for the same field but the difference in this new application is that it doesn't allow file uploads in the field like the old application did.
Wondering what the best way would be to rip those files out of the body of that field and upload them properly for the record.
Anyone have any experience here?
7 replies
When would you ever not want `isImportant` on the `configureUsing` method?
Related: https://discord.com/channels/883083792112300104/1344421288919302215
I had to fix some configuration that I was doing in a service provider and needed to set the
isImportant
flag to true
. Can anyone tell me why I wouldn't want to always set this to true? I'm not understanding why this is even a thing?
Thanks.1 replies
Can't seem to globally change the AttachAction modal width?
I have a service provider where I'm configuring defaults for many components. One component I'm trying to configure is the
Filament\Tables\Actions\AttachAction
modalWidth
.
I'm doing the following:
This does not seem to be working though. Any ideas why? It seems both the AttachAction
and the AssociateAction
are setting the modal width in their setUp
method and I thought I could override this in the configureUsing
should I not be able to?3 replies
Is there a way to evaluate this immediately without returning a closure?
I want to return an array here but I also need to check the operation of the form if it's in
create
or edit
. I don't want to return a closure because it's slower due to querying the database when the user focuses the field. I'd rather load these on page load which returning an array would do.
4 replies
How can I disable global search for a resource while still setting a `recordTitleAttribute`?
I have several resources but I want to exclude a few from the global search. Unfortunately I do not want to remove the
$recordTitleAttribute
because this does other things for the resource like handling the breadcrumbs and titles.
The documentation shows how I can disable it for the panel, but I don't want to do that. I just want to disable it for the specific resource. Is this possible?3 replies
Make field read-only but also styled as if it was disabled?
Is this possible?
->readOnly()
is what I want functionally but ->disabled()
is what I want visually. If I use ->disabled()
then the field is not submitted with the form, but if I use ->readOnly()
then the field is still focusable and looks active.6 replies