title: Radio submit in Magento header.phtml
body: <p>Magento v1.7</p>
  
  <p>How can I submit a form in the header.phtml by listening for changes on a radio button?</p>
  
  <p>This is my code, if I change the radio buttons to a select dropdown it submits fine. I can't understand</p>
  
  <pre><code>$groupId = null;
  if (Mage::getSingleton('customer/session')-&gt;isLoggedIn()) {
  
      /* Get the customer data */
      $customer = Mage::getSingleton('customer/session')-&gt;getCustomer();
      /* Get the customer's full name */
      $customer = Mage::getModel('customer/customer')-&gt;load($customer-&gt;getId()) ;
  
      $groupId = $customer-&gt;getGroupId();
  }
  $cookieGroupId = Mage::getModel('core/cookie')-&gt;get('customer_group_id');
  if ($cookieGroupId) {
      $groupId = $cookieGroupId;
  }
  
  
  ?&gt;
  
  &lt;div id="alt-nav-container"&gt;
      &lt;ul id="alt-nav"&gt;
          &lt;li class="icon-reorder"&gt;&lt;span&gt;Navigation&lt;/span&gt;&lt;/li&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  &lt;div class="header-container"&gt;
      &lt;header class="header"&gt;
          &lt;h1&gt;
              &lt;figure&gt;
                  &lt;a href="&lt;?php echo $this-&gt;getUrl('') ?&gt;" title="&lt;?php echo $this-&gt;getLogoAlt() ?&gt;" class="logo"&gt;&lt;span&gt;&lt;?php echo $this-&gt;getLogoAlt() ?&gt;&lt;/span&gt;
                  &lt;/a&gt;
              &lt;/figure&gt;
          &lt;/h1&gt;
          &lt;div class="player-container"&gt;
              &lt;div id="jquery_jplayer_1" class="jp-jplayer"&gt;&lt;/div&gt;
              &lt;div id="jp_container_1" class="jp-audio"&gt;
                  &lt;div class="jp-type-single"&gt;
                      &lt;div class="jp-gui jp-interface"&gt;
                          &lt;ul class="jp-controls"&gt;
                              &lt;li class="control-left"&gt;&lt;a href="javascript:;" class="jp-play" tabindex="1"&gt;&lt;span class="play-button"&gt;&lt;/span&gt;&lt;/a&gt;&lt;a href="javascript:;" class="jp-pause" tabindex="1"&gt;&lt;span class="pause-button"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
                              &lt;li class="control-center"&gt;&lt;strong&gt;Playing: &lt;span class="jp-track-title"&gt;&lt;/span&gt;&lt;/strong&gt; by &lt;span class="jp-composer-name"&gt;&lt;/span&gt;&lt;/li&gt;
                              &lt;li class="control-right"&gt;&lt;a href="javascript:;" class="jp-mute" tabindex="1" title="mute"&gt;&lt;span class="volume-on-button"&gt;&lt;/span&gt;&lt;/a&gt;&lt;a href="javascript:;" class="jp-unmute" tabindex="1" title="unmute"&gt;&lt;span class="volume-off-button"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
                          &lt;/ul&gt;
                          &lt;div class="jp-time-holder"&gt;
                              &lt;div class="jp-current-time"&gt;&lt;/div&gt;
                              &lt;div class="jp-progress"&gt;
                                  &lt;div class="jp-seek-bar"&gt;
                                      &lt;div class="jp-play-bar"&gt;&lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                              &lt;div class="jp-duration"&gt;&lt;/div&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                      &lt;div class="jp-no-solution"&gt;
                          &lt;span&gt;Update Required&lt;/span&gt;
                          To play the media you will need to either update your browser to a recent version or update your &lt;a href="http://get.adobe.com/flashplayer/" target="_blank"&gt;Flash plugin&lt;/a&gt;.
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  &lt;!--
  &lt;div style="z-index:9999;"&gt;
  &lt;?php
  //    var_export(get_class_methods(get_class($GroupId)));
  ?&gt;
  &lt;/div&gt; --&gt;
          &lt;div class="license-type"&gt;
  
              &lt;ul class="select-license-tab"&gt;
                  &lt;li&gt;&lt;span&gt;Select your license type &lt;sub class="icon-chevron-down"&gt;&lt;/sub&gt;&lt;/span&gt;
                      &lt;ul&gt;
                          &lt;li&gt;
                              &lt;div class="license-form"&gt;
                                  &lt;form action="&lt;?php echo $this-&gt;getUrl('mcustomer/group/update') ?&gt;" method="post" id="form-group-update" name="form-group-update"&gt;
                                      &lt;dl class="accordion"&gt;
                                      &lt;?php $groups = Mage::helper('customer')-&gt;getGroups()-&gt;toOptionArray(); ?&gt;
                                      &lt;?php foreach($groups as $group){ ?&gt;
                                          &lt;div class="license-item"&gt;
                                              &lt;dt&gt;
                                                  &lt;?php if($groupId != null &amp;&amp; $group['value'] == $groupId):?&gt;
                                                      &lt;input id="license-type-&lt;?php print $group['value'] ?&gt;" name="validate-one-required" type="radio" value="&lt;?php print $group['value'] ?&gt;" class="required-entry validate-one-required" checked="checked" /&gt;
                                                      &lt;label for="license-type-&lt;?php print $group['value'] ?&gt;"&gt;&lt;?php print $group['label'] ?&gt;&lt;/label&gt;
                                                  &lt;?php else: ?&gt;
                                                      &lt;input id="license-type-&lt;?php print $group['value'] ?&gt;" name="validate-one-required" type="radio" value="&lt;?php print $group['value'] ?&gt;" class="required-entry validate-one-required" /&gt;
                                                      &lt;label for="license-type-&lt;?php print $group['value'] ?&gt;"&gt;&lt;?php print $group['label'] ?&gt;&lt;/label&gt;
                                                  &lt;?php endif; ?&gt;
                                              &lt;/dt&gt;
                                              &lt;dd&gt;
                                                  &lt;?php print $group['customer_description'] ?&gt;
                                              &lt;/dd&gt;
                                          &lt;/div&gt;
                                      &lt;?php } ?&gt;
                                      &lt;/dl&gt;
                                  &lt;/form&gt;
                              &lt;/div&gt;
                          &lt;/li&gt;
                      &lt;/ul&gt;
                  &lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
      &lt;/header&gt;
  &lt;/div&gt;
  &lt;div class="navigation-bar"&gt;
      &lt;div class="navigation-bar-wrapper"&gt;
          &lt;?php echo $this-&gt;getChildHtml('topContainer'); ?&gt;
          &lt;?php echo $this-&gt;getChildHtml('topSearch') ?&gt;
          &lt;?php echo $this-&gt;getChildHtml('topLinks') ?&gt;
          &lt;?php echo $this-&gt;getChildHtml('store_language') ?&gt;
          &lt;?php echo $this-&gt;getChildHtml('topMenu') ?&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;script type="text/javascript"&gt;
  //&lt; ![CDATA[
  var customForm = new VarienForm('form-group-update');
  
  Event.observe($("validate-one-required"),'change', function(event){
      $('form-group-update').submit();
  });
  
  //]]&gt;
  &lt;/script&gt;
  </code></pre>
  
  <p>Thanks in advance</p>