Is my Form Component possible?

I'm trying to create an "Outline Generator" in Filament. I have achieved this already using Livewire and the result is an array of h2's, with h3 information isde of them, etc. But I have no idea where to begin looking to try and achieve this in Filament or if it's even possible. Is there a way to create a custom Form Component that looks like my "outline builder"? User clicks "Add H2" which adds a Section for that H2 where you can select image placement and then add H3's under that H2.
No description
6 Replies
awcodes
awcodes12mo ago
It’s definitely doable. But not going to be necessarily easy. You’re looking at nested conditional repeaters and/or builder components. Definitely going to need a custom form component for that layout though.
RustyTrombone
RustyTromboneOP12mo ago
Would you know where I'd begin looking? I'm all for a challenge - I'm just struggling with where to look. How would I add a repeater within a repeater when someone clicks "add H2" for example. Add H2 -> Add repeater -> add H3 -> Add repeater within repeater
awcodes
awcodes12mo ago
You can nest repeaters out of the box. Just add another repeater to the schema of the parent repeater. Repeater::make(‘h2’)->schema([ Repeater::make(‘h3’) ])
RustyTrombone
RustyTromboneOP12mo ago
So you can! So - how would I change the design of a repeater? Is that possible? Is there a way to just copy the current repeater component and change the layout?
awcodes
awcodes12mo ago
Yep. I did it with the #awcodes-table-repeater plugin. Just extend Repeater and return a different view. Yours will be more complicated, but the philosophy is the same.
RustyTrombone
RustyTromboneOP12mo ago
Superstar! Ty
Want results from more Discord servers?
Add your server