jamespickard
Calling refreshFormData on repeater clears them
I have an action that is defined like this:
And a form that's like this:
And although the party_size field refreshes property, the event_names and comments fields become blank.
Am I doing something wrong?
I made an example repository here:
https://github.com/cloudshipco/filamentphp-repeater-refresh-bug
10 replies
How to model one-to-many and allow "many" updates inside the "one" form?
I am making an application that allows users to review and update handwritten feedback forms. Each feedback form has one or more comments on it. Presently, I am modelling this as a JSON column - using an array of strings (each string is a comment). I could equally model this using a separate database table.
I am looking for advice on the best way to do this so that I can add, edit and remove comments within the feedback form edit screen.
I started trying to create a custom ViewField, but I don't know Filament well enough to know whether this approach is likely to work.
Those of you more experienced with Filament, how would you do this?
I imagine a similar sort issue could come up anywhere you want to edit the "many" in a one-to-many relationship from the "one" screen. For example, adding tags to a post, categories to a product, etc etc.
6 replies
How can I use Filament styles?
Sorry - I just started using Filament today.
I want to create a custom blade view for rendering a form component. The field in question is a JSON field that stores an array of strings. I want this rendered as multiple input fields. How can I make it so the input fields match the default Filament styles? Is there a component or partial I can use? Surely I don't just to manually copy all the Tailwind strings from a filament input to match the styling?
Here's my code so far:
5 replies
Documentation doesn't actually say what the components do
I am just starting out with Filament, reading the documentation, and am a bit confused. When I go to, for example, the Infolist Builder section there is no description of what the component is for, or looks like:
https://filamentphp.com/docs/3.x/infolists/installation
I would expect that to be the first thing when you click on a component, a description of the component... Maybe an image of the component... Am I missing something?
7 replies