How to allow only one radio button to be checked?

Clinteney Hui picture Clinteney Hui · Mar 24, 2011 · Viewed 327.3k times · Source
{% for each in AnswerQuery %}
    <form action={{address}}>
        <span>{{each.answer}}</span><input type='radio'>
        <span>Votes:{{each.answercount}}</span>
        <br>
    </form>
{% endfor %}

This is a part my django template, what it supposed to do is to print out several radio buttons, corresponding to the answers assigned to the buttons. But I don't know why I can check multiple radio buttons, which messed me up. It is supposed to only let me check on one radio button and I had that somehow but I lost it. Any help? Thank you.

Answer

Simply give them the same name:

<input type="radio" name="radAnswer" />