I have a form with a select and a few text inputs. I\'d like the form to be submitted when the select is changed. This works fine using the following:
onchan
There are a few ways this can be completed.
Elements know which form they belong to, so you don't need to wrap this in jquery, you can just call this.form which returns the form element. Then you can call submit() on a form element to submit it.
$('select').on('change', function(e){
this.form.submit()
});
documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement