My Understanding:
I could be wrong here in understanding your statement:
select the selected index if yes it goes 1 and No it goes 0
But if I understand that correctly, what you are wanting is to have your <li><a href="#">Yes</a></li><li><a href="#">No</a></li>
actually change from yes
to 1
and no
to 1
when a person on.click
the given <li>
value.
Now, if that presumption on my part of what you are wanting, is actually what you are wanting, you are going to need more than just bootstrap, and you will need to introduce a bit of jquery
into the mix of things.
I shared this a couple days ago on another question that had a similar situation.
Here is the example code in a jsfiddle for that specific situation, but I think it might also be applicable to your situation.
If you want to pass the data through a form:
Then you are probably going to have to use the method I have in my jsfiddle, which basically goes like this:
$('#optionsList li').on('click', function() {
$('#passToThis').val($(this).data("id"));
$("#privacyButton").html($(this).data("value"))
});
If all you want to do is just change the text:
Then all you should need is the second line of that same code:
$('#optionsList li').on('click', function() {
$("#privacyButton").html($(this).data("value"))
});
With the data-id=""
within the <li>
being the key part to your question/solution.
And, if I am totally off-base in all of this and not at all what you are actually answering, well, hopefully all of this will help somebody else.