Created
February 4, 2019 15:38
-
-
Save chieft3ch/91dbf88299bf99b6e7b45934151a3ddc to your computer and use it in GitHub Desktop.
Convert Checkboxes or Similar into Comma Separated list
This file contains 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
var checkedVals = $('input[type=checkbox]:checked').map(function() { | |
return this.value; | |
}).get(); | |
$(*TARGET*).val(checkedVals.join(",")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment