Forms


Adding Form submit to action

You can add this script to any action you like, for instance click on a span or button. It will trigger the form which the target is contained insida to post. Example:

$('body').on('click', '.jsSubmitForm', formSubmitter);
function formSubmitter() {
    var trigger = $(this);
    var form = trigger.parent('form');
    form.submit();
}

Published: 2016-08-25