Custom form page submit button isn't styled
I am using v3 panel builder and need a simple form...or a create form and an edit form.
I have done this by creating a custom page along with the two form components I need...one for creating, one for editing. (There is a simple trait that returns the shared form schema.)
My custom page simply calls
@livewire('create-form')
(or 'edit-form'
, depending)....and the form shows up nicely.
The problem is that the submit button isn't styled.
Yes, I can style it myself, but I feel like I'm missing something. Is it expected that one should style it "manually"...? Or have I missed something along the way...?
Thanks...9 Replies
Solution
Thx.
Do you know if this is documented anywhere...? I scour the docs, but sometimes I can't find things that I know I have read before, so I know I'm missing things sometimes. π³
Thx. I have seen a "form" component, but it isn't listed here. Any info on how to use that...?
there is no complete "form" component. you use these components to build up what you need.
or just use a panel π
OK. I was looking at
vendor/filament/filament/resources/views/components/form
...but can see that only the Page and Widget seem to be defined as "components" in that package.
Thx. I'll poke around...maybe use the panel. I was just wanting to have the same spacing with my custom form as I have with the "standard" forms. π
Actually...I don't see any Panel component...so perhaps that's not what you meant....Panel is the main package that provides a shell around all the packages.
and you can style it with a custom theme.
but you may not need a full "admin" panel. in which case you can keep doing what you're doing.
OK. I'm using a combination, I guess. I have the need for a create/edit form, but not the listing or anything else. I first went the route of creating a resource and trying to control it so that it didn't show the listing and the breadcrumbs were "right", etc....but it seemed like it was too much.
So, I instead created a custom page that will display the individual create/edit forms, depending.
This is the way to go if one needs a kind of standalone create/edit for a single resource. It's like a Profile resource for users...but each user will only ever have one or none.
Makes sense.