I have a form that contains a bunch of checkboxes. Before submitting the form, I’d like to grab the values of the checkboxes and stick them into a text field, then submit that.
So I might have: Red Orange X Yellow Blue X Green
And I’d like my textfield to end up with the content ‘Yellow, Green’ .
This doesn’t seem too complicated, but I am totally out of my league. I already use jQuery for a few other things so I have the framework ready, if that makes it easer.
Thanks for any advice —
Just use this code:
It starts when page is loaded and bind to ‘submit’ event of your form correct function