title: Using onclick event store data of extra field in codeigniter
body: <p>I am trying to store data which is the only show if someone clicks on an online payment. Its easy in PHP, but in Codeigniter it's not working.</p>
  
  <pre><code>&lt;div class="radio"&gt;
                  &lt;?php echo form_radio('bank', 'Online Payment', FALSE, 
     ['onclick'=&gt;"add_fields()"]); ?&gt;&lt;?php echo form_label('Online Payment', 
    'bank');?&gt;
              &lt;br&gt;    &lt;?php echo form_radio('bank', 'Cash', FALSE); ?&gt;&lt;?php 
     echo form_label('Cash', 'bank');?&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>&amp; here is the script:</p>
  
  <pre><code>  &lt;script&gt;
    function add_fields()
    {
     var d = document.getElementById("content");
  
     d.innerHTML += "Enter Bank Details&lt;br /&gt; &lt;input 
      type='text',name='bankdetail'/&gt;";
  
   }
  &lt;/script&gt;
  &lt;p id="content"&gt;&lt;/p&gt;
  </code></pre>
  
  <p>I try to use:</p>
  
  <pre><code> d.innerHTML += "Enter Bank Details&lt;br /&gt;  &lt;?php echo form_input(['name'=&gt;'bankdetail']);?&gt;";
  </code></pre>
  
  <p>but its not show the field.</p>