I have a form in which the Submit button does not sit within the tags. The submit button has an
click
handler to submit the form via jQuer
This seems to be an old question, but since I just ran into a similar issue and found a good solution (for me), I thought I'd post it:
$('#admin_form').trigger('submit', [ { 'variable_name': true } ]);
or
$('#admin_form').trigger('submit', [ 'variable_name', 'true' ]);
depending on whether you want to pass a variable called variable_name
with value true
or you want to pass 2 separate variables.
And just to be clear, this will not of course automatically submit variable_name
with the rest of the form fields, but if you have a submit handler, as I do in jQuery, the variables will be passed as arguments, after the event.