Have a form using multiple checkboxes with a class of ‘test’ (only one of which can be checked however similar to using radio buttons – not my idea btw!).
When the form is submitted I want to get the value of the checkbox that is checked and store it in a variable – can anyone help here?
Cheers!
Chris
.val()returnsundefinedif called on an empty jQuery object, which would be the case here if no checkboxes are checked.