Updated to allow proper, robust use of radio buttons. Thanks to er40 for pointing out the bug with required radio buttons.