title: Codeigniter 3, form_dropdown, default and repopulating not working as expected
body: <p>I would like the dropdown so default to the logged in user.  If the user is changed, and if there is an error with validation, the dropdown should repopulate with what was selected.  </p>
  
  <p>Here is my code:</p>
  
  <pre><code>&lt;?php
  $default_pic = $this-&gt;ion_auth-&gt;user()-&gt;row()-&gt;id;
  
  $options = array();
  foreach ($users_datas as $users_data) {
      $options2[$users_data['id']] =  $users_data['email'];
  }
  ?&gt;
  
  &lt;div class="form-group  col-lg-3 col-md-3"&gt;
  &lt;?php
      echo form_label('PIC', 'prospects_user_id');
      echo form_dropdown('prospects_user_id', $options2, set_value('email'));
  ?&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The form_dropdown populates with a list of user ids (<code>id</code>) and email addresses (<code>email</code>).  </p>
  
  <p>If I use, the below code, I would expect that whatever was chosen in the dropdown would repopulate with that choice upon validation error but it just goes to the first selection in the lsit.</p>
  
  <p><code>echo form_dropdown('prospects_user_id', $options2, set_value('email'));</code></p>
  
  <p>If I use the below code, I would expect the default to me the logged in user (obtained by <code>$default_pic = $this-&gt;ion_auth-&gt;user()-&gt;row()-&gt;id;</code>).  It works as expected on first load but if I select another user in the drop down and there is a validation error, it goes back to the default user. </p>
  
  <p>How can I make the default user on initial load the logged in user (again, obtained by <code>$default_pic = $this-&gt;ion_auth-&gt;user()-&gt;row()-&gt;id;</code>) and whenever there is a validation error on the form, the dropdown repopulates with what was last choosen?</p>