Ric Le Poidevin
How to trigger a form save from another action?
@OrdinaryDev Did you find a solution to saving from the action? I have the same issue. Seems like it should be simple as I think a lot of people will want to save their data before running an action.
5 replies
On Selects is it possible to make the createOptionForm button clearer
@awcodes thanks, this worked, anywhere I can make a feature request as I think have some customisability over the display of the select create button would be valuable
11 replies
How to get current record on Table action using a custom form field
Thinking about this a but more, the other option would be to access the record in the Field’s class
class BraintreePayment extends Field
but calling $this->getRecord()
errors: Typed property Filament\Forms\Components\Component::$container must not be accessed before initialization
3 replies
Multi-tenancy and createOptionForm on Select, Field 'company_id' doesn't have a default value
there’s nowhere that runs on the create option form, it’s only used when creating a standalone form as far as I can see. I shall need to try digging deeper
14 replies
Multi-tenancy and createOptionForm on Select, Field 'company_id' doesn't have a default value
I can add that to the Edit page for contacts as in the docs https://filamentphp.com/docs/3.x/panels/resources/editing-records#customizing-data-before-filling-the-form
but this isn’t run for the save operation:
->createOptionForm(fn(Form $form) => ContactResource::form($form)),
Do I need to put it somewhere else?14 replies
getCurrentPanel returning wrong panel
Fixed it. I was applying my middleware in the Laravel kernel file, not the middleware section of the panel’s config.
So it looks like the default panel is loaded by Laravel then replaced later.
Panel middleware means I don’t even need to do the check in my middleware code, that’s already done!
4 replies
Save form before running action
For anyone finding this here is the solution that worked for me
I removed the save buttons from the
Create
and Edit
pages and added a submitAction
to my wizard to handle saving the form.
When saved the user is redirected to the Edit
page for the resource. I then added a header action as below.
18 replies