I have the following HTML that creates a radio button group using Bootstrap.
$('button[name="rating"].active').val();
In plain English that selection reads as:
button
elementsname
attribute that has a value of rating (the group)active
(indicating it was selected)Edit based on OP's new question in comments:
To capture the input from the button you will need to use custom script handlers. If your goal is to actually submit this with the form, I would actually suggest against it. Mostly because this is not what a user is expecting in a form. Just use a regular radio button input.
However if you do want to use this, you can do the following:
$('form').submit(function() {
var rating = $('button[name="rating"].active').val();
// get the rest of the values
// submit the form
});
Here's an example with a regular input
vs. the button
and why you shouldn't use the button in a form: http://jsfiddle.net/TxgVe/1/