There's something wrong with my code and I can't figure out what it is. I am using jQuery mobile to generate radio buttons forms. However, it is not working as expected. It appears just like this (picture link: http://tinypic.com/r/4q0os8/5 ) while it should list all the radio buttons below each other
Generated HTML:
<div data-role="content">
<h3>
Answer This Question
</h3>
<form action="storeresponse.php" method="GET" ajax-data="false">
<div data-role="fieldcontain">
<fieldset data-role="controlgroup" data-type="vertical">
<legend>
What is your favorite food? </legend>
<input id="radio1" value="" name="option" data-theme="c" type="radio">
<label for="radio1">Pizza</label>
<input id="radio1" value="" name="option" data-theme="c" type="radio">
<label for="radio1">Pasta</label>
<input id="radio1" value="" name="option" data-theme="c" type="radio">
<label for="radio1">Chicken wings</label>
<input id="radio1" value="" name="option" data-theme="c" type="radio">
<label for="radio1">Noodles</label>
</fieldset>
<input type="submit" data-theme="b" data-icon="check" data-iconpos="right"
value="Submit">
</div>
</form>
It's generating the same ID for each radio button while I've added $i++