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

How to get value on form submit #71

Open
icolumbro opened this issue Jul 5, 2019 · 1 comment
Open

How to get value on form submit #71

icolumbro opened this issue Jul 5, 2019 · 1 comment

Comments

@icolumbro
Copy link

No description provided.

@icolumbro
Copy link
Author

I have a form with a select on which I'm try to using jQuery Editable Select. How can I get the original value of an element when the form is submitted?

HTML:

<form id="my_form">
    <select id="my_select">
        <option value="1">One</option>
        <option value="2">Two</option>
       <option value="3">Three</option>
    </select>
</form>

jQuery:

$('#my_select').editableSelect();
$('#my_form').on('submit', function(e){
    e.preventDefault();
    var option_value = ???;

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

No branches or pull requests

1 participant