Replies: 6 comments 15 replies
-
or maybe much better as a user I want to be able to add buttons to so that it's easy for me to add any actions I want need to make the form easy to use. an example would be to add |
Beta Was this translation helpful? Give feedback.
-
Not sure if you found solution for this yet, but i needed such button and i was able to do it like below in your edit resource page add the following
|
Beta Was this translation helpful? Give feedback.
-
Are you looking to just add a filament button to a page? This is documented in V3, but just found it works on V2:
It does not need to be on a form, table or admin component - it works anywhere. Maybe it is in V2 document? I've never been able to find it though. |
Beta Was this translation helpful? Give feedback.
-
https://laraveldaily.com/post/filament-add-custom-action-button-inside-form Maybe this can help you. |
Beta Was this translation helpful? Give feedback.
-
Hi! I was able to add two buttons following these examples, but I need to modify the value (state) of a field if the user clicks on that button. Specifically: I have two buttons: Save to draft In both casds, I want to save the form. But, if the user clicks the "Save to draft" button, I need change the status field to the value "draft". And if the user clicks the "Save and publish" button, I need to set the status field to the value "published". In my PostResource/Pages/CreatePost.php I have:
But I can't find a way to access that field in my form and set the value I want. |
Beta Was this translation helpful? Give feedback.
-
For Filament V2 you can use something like this:
And in the Page you will need to forms: protected function getForms(): array
{
return [
'firstForm' => $this->makeForm()
->schema($this->getFirstFormSchema()),
'otherForm' => $this->makeForm()
->schema($this->getOtherFormSchema()),
];
} |
Beta Was this translation helpful? Give feedback.
-
now the create-form page has the button
save
.as a user
I want to have something like
Cancel
,Save and close
,Save and create another
&Save
buttonsand these buttons can be turned off since I want to turn them on some resources only.
so that it's simple for the customers to understand what's happening when they clicked a button.
Beta Was this translation helpful? Give feedback.
All reactions