Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restore value capturing for forms without submit button #471

Merged
merged 1 commit into from
Feb 20, 2017

Conversation

wchristian
Copy link
Contributor

In our code base we have a few tiny forms like this, that are just a checkbox that trigger an ajax post:

<form action="/" method="post" id="domain_haupt_form_asd_de">
    <input type="hidden" name="domain" value="asd.de">
    <input type="checkbox" onchange="$(this).submit()">
</form>

Before the fix for #365 was included this worked perfectly fine, but after its inclusion the value for domain stopped being sent along, since e.target points at the checkbox input and ajaxSubmit sends that input to formToArray, which has no clue as to what to do with it and fails to extract the form values.

In our code base we have a few tiny forms like this, that are just a
checkbox that trigger an ajax post:

<form action="/" method="post" id="domain_haupt_form_asd_de">
    <input type="hidden" name="domain" value="asd.de">
    <input type="checkbox" onchange="$(this).submit()">
</form>

Before the fix for jquery-form#365 was included this worked perfectly fine, but after
its inclusion the value for domain stopped being sent along, since e.target
points at the checkbox input and ajaxSubmit sends that input to
formToArray, which has no clue as to what to do with it and fails to
extract the form values.
@kevindb
Copy link
Contributor

kevindb commented Jan 15, 2017

This pull request was merged into the maintained fork of this plugin at #11

@kevindb kevindb merged commit 076fbc1 into jquery-form:master Feb 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants