Steve_OH
No way to Mutate form data for created record using an action button on external resource
As the title suggests, I am attempting to create a record inside of another resource using a modal while passing values from the current record. The general use case is that I have a record open and would like to create a 'task' based on the current record. As such, I have a create action button, which triggers a form from an existing resource.
The issue arises when I try to pass current form data into the modal. I found that
mutateFormDataUsing
, using
, etc. seem to run after it's submitted, which is unhelpful. I did find afterFormFilled
, which can be used to modify the table after default fields are entered, but there's not really any documentation on how to use it beyond simply stating that it can be used and my best efforts seem inconclusive.
I have also messed around with $form->fill([])
(see below) as part of the form function, but may be doing it wrong as while the form still shows up, it does not pre-fill the values.
My current efforts do not seem to yield correct results. I'd appreciate any help you can provide!
My CreateAction button is called as follows:
My afterFormFilled
dd function shows the form exists and I can see the components are present as expected, but I have no idea how to modify it from here. I've attempted to use Set, but this failed for some reason. Please help!9 replies
Sending updates to livewire elements on database change
I've built a cart element using livewire that is attached to my top menu bar and am attempting to send real-time updates to the element to show when items are added or removed from the cart.
My current method of deploying the element to the layout is with a render hook
This works for displaying items in the cart, but any changes from an action or from the cart itself do not display real-time changes, I'd like to change this behavior if I can. What is my best move forward?
Thank you for your time
7 replies
Unique record within tenancy rather than across the board?
As the title suggests, I'm attempting to tighten up one of my tables with the 'unique' property and would like to scope the limitations entirely to the tenant rather than across the board.
For example:
This should work for editing, but I can see a flaw for creation, when the record doesn't yet exist. What is the most efficient way to get this id other than by extracting it from the user? I ask as I have created the ability to create content for my clients and would prefer to have checks account for this as there may be issues in this case.
6 replies
Any way to modify charts to only return a subset of data?
I'm attempting to create a user activity chart and presently have users organized into smaller sub-sets. I wondered if there was a way to only show chart results for users within the same user's sub-set list? For example
I'm wondering if there is a way to use the
$activity
variable somehow instead of the class? Or can I filter it after the values are returned from getPerMonth?
Thanks in advance!18 replies
Local Storage and Production storages differ
Hey, so I'm having an issue setting storage. On my local installation, storage is located at directory/storage/files, whereas on the server they understandably go to directory/public/storage/files. How do I fix this? I attempted to do the storage link, but it said it was already set.
I'm sure it is some simple config somewhere, but I appreciate any help that can be provided!
19 replies
Is there a way to show html images inside an infolist?
In the Rich Text Editor you can add images, is there a way to display those images when viewing the record with an infolist? I tried the ->html() method, but the image does not show up, or maybe I've done something wrong?
The infolist item is as follows:
Suggestions and help would be greatly appreciated!
6 replies
Method for allowing full HTML/Markup in Table View
I'm attempting to create a ticketing program for my panel and thought it would make sense to use a table for any comments on the ticket. However, an issue arises whenever any real formatting comes into play for the comments.
Take for example the following code used in my relation manager for the ticket comments (ignoring that card and enableDownload are depreciated):
The output displays the comments, but the comments are devoid of any real formatting. Is there a way to override the default table formatting behavior?
Alternatively, would a repeater be best for this? If so, any good examples I can follow?
2 replies
public access forms
Hello! First off, Filament is a fantastic framework that I am thoroughly enjoying.
I’m wondering if it’s possible to set up a panel entirely for a form for guests? For example, a contact form, a survey, or a ticket? The table would exist for logged in users, but the creation would only exist on the guest panel. The form would act as a registration of sorts and would redirect or show a success page when done.
4 replies
Any way to add filter to global search?
Not sure if I selected the right tag, but is there any way to add a search filter to global search? I have organizations set and would like to filter results of global search to remain within that organization. I've attempted the following function, which produces an empty result, but clicking it still links to the hidden result.
3 replies