Can I get a callback when sending a class="form-ajax-submit" form?


#1

Im sending a form with the class form-ajax-submit and I wonder if I can get a callback from that?
Can I see when the page if finished somehow?
Thanks.

I forgot about it and just found it as soon as I asked haha
$$(’#sparaprodukter.form-ajax-submit’).on(‘formajax:success’, function (e) {
var xhr = e.detail.xhr; // actual XHR object
var data = e.detail.data; // Ajax repsonse from action file
app.dialog.alert(‘Ditt val är sparat.’,‘TEST’)
});