In jQuery, if I assign class=auto_submit_form
to a form, it will be submitted whenever any element is changed, with the following code:
/* autom
I came up with a generic approach to this:
$('.autoSubmit, .autoSubmit select, .autoSubmit input, .autoSubmit textarea').change(function () {
const el = $(this);
let form;
if (el.is('form')) { form = el; }
else { form = el.closest('form'); }
form.submit();
});
All elements of a form:
Only individual elements