Form Relations not firing Model Observers?

So instead of the hooks, I have observer for the models. This happens to be in a form relation. My problem is that the observer aren't firiing when I add a new item of the relationship's Repeater field. Also not getting fired after updating the fields inside the repeater. How can I successfully tap into it? My goal is to send email whenever it add items and update items inside the repeater field. Thanks!
5 Replies
Dan Harrin
Dan Harrin2y ago
observers fire when stuff is saved adding an item to the repeater does not save it
binaryruel
binaryruelOP2y ago
I meant when saving and updating the repeater items. Nothing happens.
awcodes
awcodes2y ago
Nothing is going to happen. Adding / deleting an item only updates the state of the form, it doesn’t update the record in db.
binaryruel
binaryruelOP2y ago
What's the best way to listen on those changes?
awcodes
awcodes2y ago
afterStateUpdated() on the repeater. But I not sure any model should be updated on the state change. Otherwise you loose the ability to throw out the changes if they were unintentional or by mistake.
Want results from more Discord servers?
Add your server