F
Filament15mo ago
Oxalate

How to modify data before saving in simple modal.

I have a simple modal and I want to generate a code for the model before saving. When I add the create action to the actions list, it works from the table records which is not how I want it to work. I don't know how to modify the main create trigger on the page.
7 Replies
Oxalate
OxalateOP15mo ago
Yes I have used that but it works fine for the table. I don't know how to make it work with the page trigger
LeandroFerreira
LeandroFerreira15mo ago
Sorry, I didn't understand
Oxalate
OxalateOP15mo ago
I want it to work for the main trigger above the table like so
No description
LeandroFerreira
LeandroFerreira15mo ago
Is it a resource --simple? You can access the create action on ManageXX.php file
awcodes
awcodes15mo ago
Put it in ->headerActions() instead of ->actions()
Oxalate
OxalateOP15mo ago
Yes it's a simple resource You are a genius!!! I've been looking through the documentation but it didn't make sense at all. Now everything works when I update in the Managexxxxphp file Yes this too works fine but shows up above the table. I just didn't want two buttons to show up. But I like it as well. Thank you.
Want results from more Discord servers?
Add your server