Tuesday, July 28, 2015

Radio Button Erratic Behavior in Firefox Only

I have this HTML below. Where there are two radio buttons.
  <label class="full-width label-indented">Are you applying for membership in the Flexi Fund Program?       
      <p><input type="radio" id="flexi" name="flexi" value="A" autocomplete="off" />&nbsp;<span class="label">Yes</span></p>  
      <p><input type="radio" id="flexi1" name="flexi" value="0" autocomplete="off" checked/>&nbsp;<span class="label">No</span></p>  
 </label>  

Problem:
On first try, When I select No radio button, it automatically selects to Yes. And the Yes button is always clicked no matter how I try to select the No button.

Solution: Remove radio buttons inside label tag.
 <label class="full-width label-indented">Are you applying for membership in the Flexi Fund Program?</label>  
 <p><input type="radio" id="flexi" name="flexi" value="A" autocomplete="off" />&nbsp;<span class="label">Yes</span></p>  
 <p><input type="radio" id="flexi1" name="flexi" value="0" autocomplete="off" checked/>&nbsp;<span class="label">No</span></p>  

No comments:

Post a Comment