JS and jQuery - loop through textboxes and store value
<p>Here's the function that checks if the form is complete.</p>

<p>So, what I'm trying to do:</p>

<ol>
<li>If radio is not selected, throw a message.</li>
<li>If radio is "yes", but text is not entered, throw error.</li>
<li>If radio is "no" but text is entered, make the text empty.</li>
<li>If all is good, add stuff into `allResponses</li>
</ol>

<p>The form was displayed 5 times, and input was as follows:</p>

<pre><code>Yes a1

No

Yes a3

No

Yes 
</code></pre>

<p>Now, this input should display an error since in 5th case, "yes" is selected but nothing is entered in the textbox.</p>

<p>However, I get this:</p>

<p><a href="http://i.imgur.com/ya2CUp0.png" rel="nofollow">http://i.imgur.com/ya2CUp0.png</a></p>

<p>Also, the text is not being updated as in 1st and 3rd cases.</p>

<p>I don't know a lot about JS, so please provide me with as explained responses as you can.</p>

<p>EDIT: Complete code: <a href="http://pastebin.com/scNSNM2H" rel="nofollow">http://pastebin.com/scNSNM2H</a></p>

<p>Thanks</p>
