Welcome Guest, Not a member yet? Register   Sign In
first time using form_upload and need to retain file if user did not pass validation
#1

[eluser]Brad K Morse[/eluser]
in the controller I have

Code:
//controller
$this->form_validation->set_rules('attachment', '', '');

//view
<div class="form-field long-label">
  &lt;?=form_label("Need to attach the assignment?")?&gt;
  &lt;?=form_error('attachment')?&gt;
  &lt;?=form_upload('attachment', set_value('attachment'))?&gt;
</div>

selected file, right before I submit the form: http://cl.ly/59ft

submitted form, did not pass validation, now the file field is blank, thought it would retain the value like set_value() does w/ all other inputs: http://cl.ly/58nr




Theme © iAndrew 2016 - Forum software by © MyBB