title: ZF2 - Control/customise individual radio/checkboxes
body: <p>I'm attempting to add <code>data-</code> values on radio buttons within ZF2. Is it possible to control each of the inputs specified with <code>value_options</code>?</p>
  
  <p>A typical radio button added to a form:</p>
  
  <pre><code>$this-&gt;add(array(
      'type'  =&gt; 'radio',
      'name'  =&gt; 'duration',
      'options' =&gt; array(
          'value_options' =&gt; array(
              'daily' =&gt; 'Daily',
              'weekly' =&gt; 'Weekly',
              'monthly' =&gt; 'Monthly',
          ),
      ),
  ));  
  </code></pre>
  
  <p>Ultimately, I would like something like the following, so I can specify individual parameters/options for each radio item:</p>
  
  <pre><code>$this-&gt;add(array(
      'type'  =&gt; 'radio',
      'name'  =&gt; 'duration',
      'options' =&gt; array(
          'value_options' =&gt; array(
              array(
                  'attributes' =&gt; array(
                      'value' =&gt; 'daily',
                      'data-item' =&gt; 'apple'
                  ),
                  'options' =&gt; array(
                      'label' =&gt; 'Daily'
                  )
              ),
              array(
                  'attributes' =&gt; array(
                      'value' =&gt; 'weekly',
                      'data-item' =&gt; 'orange'
                  ),
                  'options' =&gt; array(
                      'label' =&gt; 'Weekly'
                  )
              ),
              array(
                  'attributes' =&gt; array(
                      'value' =&gt; 'monthly',
                      'data-item' =&gt; 'pear'
                  ),
                  'options' =&gt; array(
                      'label' =&gt; 'Monthly'
                  )
              ),
          ),
      ),
  ));
  </code></pre>
  
  <p>My reason for wanting the above, is that I want to use JavaScript to change something upon selecting a radio button, so it needs to hold data attributes.</p>
  
  <p>Is anything like this possible yet?</p>