title: php codeigniter - form helper - How to implement set_value on radio input
body: <p>I am in the process of setting up a feedback form for my site using codeigniters form helper.</p>
  
  <p>My form has been created and validation implemented, all works.</p>
  
  <p>My only problem is adding the set_value() function to repopulate the form if an error occurs.</p>
  
  <p>I can't get it to work on my radio inputs, how do you add the set_value() function to a radio type.</p>
  
  <p>Code:</p>
  
  <pre><code>      &lt;ul&gt; 
            &lt;li&gt;&lt;?php echo form_radio('found_by', 'newspaper_advert', set_value('found_by')); ?&gt; Newspaper advert&lt;/li&gt;
            &lt;li&gt;&lt;?php echo form_radio('found_by', 'press_release', set_value('found_by')); ?&gt; Press release&lt;/li&gt;
            &lt;li&gt;&lt;?php echo form_radio('found_by', 'text_message', set_value('found_by')); ?&gt; Text message&lt;/li&gt;
            &lt;li&gt;&lt;?php echo form_radio('found_by', 'email', set_value('found_by')); ?&gt; Email&lt;/li&gt;
            &lt;li&gt;&lt;?php echo form_radio('found_by', 'refferal', set_value('found_by')); ?&gt; Referred to by a friend&lt;/li&gt;
            &lt;li&gt;&lt;?php echo form_radio('found_by', 'telemarketing', set_value('found_by')); ?&gt; Telemarketing&lt;/li&gt;
            &lt;li&gt;&lt;?php echo form_radio('found_by', 'leaflet_flyer', set_value('found_by')); ?&gt; Leaflet or flyer&lt;/li&gt;
            &lt;li&gt;&lt;?php echo form_radio('found_by', 'radio', set_value('found_by')); ?&gt; Radio&lt;/li&gt;
            &lt;li&gt;&lt;?php echo form_radio('found_by', 'television', set_value('found_by')); ?&gt; Television&lt;/li&gt;
            &lt;li&gt;&lt;?php echo form_radio('found_by', 'internet_advert', set_value('found_by')); ?&gt; Internet advert&lt;/li&gt;
            &lt;li&gt;&lt;?php echo form_radio('found_by', 'search_engine', set_value('found_by')); ?&gt; Search engine&lt;/li&gt;
            &lt;li&gt;&lt;?php echo form_radio('found_by', 'none', set_value('found_by')); ?&gt; None of the above&lt;/li&gt;
        &lt;/ul&gt;
  </code></pre>