Save form before calling a header action
Hi,
I have a resource with a repeater inside of it. I want the user to easily add tariffs to the order and when they are done adding the tariffs, they should hit the send offer button.
This then sends out an email to the customer with the just added tariff information.
However ofcourse the form is not yet saved through the save form button. The tariffs are therefore not saved to the database. I have tried a lot, and can retrieve the data through the livewire component. But my issue is that I then need to manually update all the fields of the order, and of the order tariffs. Is there a way to instantly save the entire form and then proceed with my custom action?
This is my current action:
Solution:Jump to solution
Solution was quite simple. Just call $this->save inside the action function. It will then save the form...
```
Action::make('Send Offer')
->requiresConfirmation()...
1 Reply
Solution
Solution was quite simple. Just call $this->save inside the action function. It will then save the form...