Created
July 6, 2014 08:15
-
-
Save harshamv/e1d460b88c83c78a95da to your computer and use it in GitHub Desktop.
Auto-submitting select tag
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you want your form to be submitted when user selects something, use: | |
:onchange => "this.form.submit();" | |
For example: | |
select_tag "people", "<option>David</option>", :onchange => "this.form.submit();" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment