Ben
Custom Save Button for Create/Edit with Disable on FileUpload
Hello Filament Friends,
I have a problem with implementing different Save Buttons. My process should be such that the Save buttons determine whether an entry is active or not (published). So, my implementation has several buttons below the form, including "Save" and "Activate and Save." I'm not sure if my implementation is good. Depending on which button is pressed, I adjust data, like this:
Well, that works, but if uploads are not yet completed, one can click these buttons and the uploads are lost. In the case of the standard Save button, submission is blocked until completion. And that's what i want to achieve.
I tried to use the standard Actions and change them, but it didn't work. Like this...
I know that there are methods to modify data before saving, but I'm not sure how to determine which button was pressed at that point.
And honestly, I haven't fully understood what the "submit('save')" in the standard action exactly means. I still need to figure that out.
Thank you!
6 replies
How to Warn Users of Unsaved Changes on the TenantProfile Page?
Hi Guys, I have a page "EditCompanyProfile" which extends
EditTenantProfile
. Editing and saving work fine, but I need to warn the user if they don't save their changes before leaving, as there are a dozen fields there. At the moment, the user can leave without warning. As far as I understood from a discussion about warnings on pages, this issue was resolved with this solution https://github.com/filamentphp/filament/issues/9992, but somehow, it doesn't work for me. Any help is appreciated. Thanks. Running on Filament v3.2.62.4 replies