bionary
Anybody find a decent solution for table images to a lightbox?
(I'm surprised filament doesn't have a builtin lightbox for table records...it seems to have everything else imaginable!)
The 2 lightbox plugins are not solutions.
- https://filamentphp.com/plugins/njxqlus-lightbox
This plugin doesn't support use in tables, so that's of no help here.
- https://filamentphp.com/plugins/solution-forest-simplelightbox
This plugin simply doesn't work and doesn't seem to be actively maintained.
1 replies
Fire js event from SelectColumn
I cannot seem to fire an event from SelectColumn in v2. of filament.
Even when inspecting the console there doesn't seem to be any events triggered at all with the select column change.
effects.dirty[]
How can I trigger a js event when I change the dropdown here?10 replies
Refreshing Form F v2
I have a scenario in which I alter saved model properties using model events:
static::saving() ...
As a result I need to refresh the form fields after being saved, because they are sometimes changed on the backend.
Using filament v2 here...I cannot get this to work.
On my edit page of resource:
This does't work.
Have any ideas?1 replies
Filters applied on load?
using Filament v.2
I have a table widget with some filters. I have a "less then pricing" filter for input pricing.
When the page/table loads the filter is being applied automatically with a value == 0.
How do I prevent table widget filters from being applied on load? (with filament v.2)
Relevant code:
2 replies
ToggleColumn Alpine Error
Anybody try ToggleColumn lately? I haven't used a ToggleColumn on a table in a long time...used it today and it seems broken.
I get a js console error: "module.esm.js:421 Alpine Expression Error: await is only valid in async functions and the top level bodies of modules"
My front end skills are garbage and to the best of my knowledge I haven't done anything out of the ordinary to cause this.
Any ideas?
4 replies
Persist data via relationship manager Create & Create Again
On a normal page form I can persist data for auto-filling in repetitive fields by flashing the session on save like:
Now I need to do this with the Relationship Manager. When attaching records how can I access the save and save another action to flash the session?
1 replies
Multi-Select Relationship by Image / Visually
I have a model:
How can I give the same same experience/results as a mulit-select \Forms\Components\Select() BUT with images rather than a text dropdown. In short I need the user to be able to search for images and select them to assign many artwork images to a single exhibition. Should I but using select? or maybe a RelationManager is better? Would love some advice please My latest attempt is with a relation-manager but that attempts to create new artwork which I don't want...I need to assign many artworks, visually to a parent exhibition.
Exhibition
which can have many Models: Artwork
How can I give the same same experience/results as a mulit-select \Forms\Components\Select() BUT with images rather than a text dropdown. In short I need the user to be able to search for images and select them to assign many artwork images to a single exhibition. Should I but using select? or maybe a RelationManager is better? Would love some advice please My latest attempt is with a relation-manager but that attempts to create new artwork which I don't want...I need to assign many artworks, visually to a parent exhibition.
43 replies
Native Back Button leads to Broken Resource Limits
1. Set an admin resource table to something other than the default: "50 per page" for example
2. Click to view an item
3. Click native back button
4. Unexpected results on the admin table
The page goes back to the admin resource list, displays "50 per page" at the bottom of the table, but only shows 10 records.
Is there a fix for this?
Thanks !
6 replies
Create & create another - reuse fields
When clicking the "Create & create another" button is there a way to reuse some of the input fields? (Have some chosen inputs default to the previous value that was just saved) I have a massive number of fields and many of them could benefit by retaining the same info.
10 replies
Sharing form() Resources ?
I was wondering if I could load another resource's $form into the
--simple
modal of a different resource?
Use case: I can quickly access resource views quickly such as comment threads (from dash) related to other models...rather then having to go to that resource table, find the record with comments, click through...etc.. Having a table of comments is not very useful, but clicking through to the record where all of the comments exist on the related model is more useful I believe.
From my attempts the trick seems to be associating the model record with the form, while inside of another resource. Not sure how to do this.
An example from my code is:
I'm referencing the form above, but it obviously has no awareness of the correct model. Are there any methods that allow passing in the correct model/record?
OR maybe I'm thinking about this incorrectly, or it's quite possible that this is not even possible with filament.69 replies
Complete headings set with RichEditor (trix)?
Anybody know any options for adding more headings to filament's
RichEditor (Trix)
form input?
Right now the only options are "heading" and "Subheading" which resolve to h2,h3 tags. I like the trix editor but would like to have h4, h5 as an option as well. Thanks.9 replies
How to filter table based on grandparent relationships?
Say I have relationship structure: Project > Category > Article > Illustration
I'm interested in filtering by Project when viewing the Illustration list.
I have set up all my
I also realized that you can do some filament stuff for Form: Selects in forms like this: That admittedly works for forms, but I cannot seem to find a similar / suitable solution for filtering table data based on grandparent relationships. (I also experimented with the
belongsTo()
relationships. It's simple when using pure Laravel; to traverse back up the parents:
But in filament I'm not sure how to handle this type of filtering. I realize this would be easy if Laravel handled nested relationships but apparently it does not 😦I also realized that you can do some filament stuff for Form: Selects in forms like this: That admittedly works for forms, but I cannot seem to find a similar / suitable solution for filtering table data based on grandparent relationships. (I also experimented with the
belongs-to-through
package, but that doesn't seem to work either)
Any help would be appreciated, thanks!11 replies
Conditionally Prevent Record Edit?
I know I can disable form inputs one-by-one via
Thanks in advance for any guidance!
->disabled(...)
. But, what if I wish to prevent editing for entire page based on a field in the model. Like if $record->is_locked == true
?
If would be great to prevent the edit page from opening or in the least open to a view page.Thanks in advance for any guidance!
9 replies
Additional Info Fields in Form
What is the best way to go about adding supplemental data fields to a form? But the catch is, it shouldn't be handled as form fields. (not saved)
I often find that including stuff like parent-relationship info in or near the form is helpful sometimes.
I tried using
ViewField
and making sure that my view had non-form elements in it, but when upon saving the form, filament is expecting a saved data field for "parent_properties" as setup below.
I know I can use one of the mutateData...functions to strip the form input prior to being saved, but I can see this getting sloppy and bloated quickly. What is a better approach? Thanks!6 replies
Form Columns Variable/Dynamic
To my chagrin there is no closure available to Form's columns I'm using Group/Sections with
->column()
And really need the ability to change the column numbers dynamically. Any idea how to set a form column value dynamically?37 replies
Pagination Index in Table Widget?
I noticed that my table resource has an index of page numbers (bottom right). While any table widgets I use on regular pages (non-resource) do not. The table-widgets on pages simply have [ < previous ] and [next >] buttons.
Is there anyway to include that fancy numerical pagination index in a table widget?
Is there anyway to include that fancy numerical pagination index in a table widget?
17 replies
show/hide reorder based on conditions?
Reordering a table seemed amazing until I realized I'm working with a table with ~5000 rows ...it hangs up and goes kaboom unless a filter that limits the data is applied.
I'd love to be able to enforce that practice with end users.
I was thinking that maybe conditionally showing the reorder icon only when a filter is present would be a potential solution. But
reorderable()
only accepts string input. 😦
Any advice for working with sortable rows with large data sets?10 replies
Change Create Button Label
Is it possible to change the default button label that auto generates for default "Create" route on a model resource? The "New Strange Model Name" is awkward.
Note I'm not talking about button()->label() this is the "New Model" button that shows up in upper right side of a resource::index page
8 replies