Welcome Guest, Not a member yet? Register   Sign In
form_open_multipart with form_validation - am I missing something or is it a bug ?
#5

[eluser]davidbehler[/eluser]
To answer your first question: The test_files view is loaded everytime you submit the form because no validation rules = is not valid, meaning $this->form_validation->run() always returns FALSE.

To answer your second question: Because it doesn't support it Wink The lib doesn't know what type of input the fields are you set the rules for. It loops through all the rules and checks $_POST for each field according to what rules you defined, e.g. trim|required|valid_email. Now in case of an input with type="file", it'll not appear in $_POST but rather in $_FILES (but the form validation lib doesn't check that one).

Some time back I read about an extended version of the form validation that actually works with file uploads, but I haven't used it yet. I'm still kickin' it old school by combining form validation with file uploading and works fine for me so far.


Messages In This Thread
form_open_multipart with form_validation - am I missing something or is it a bug ? - by El Forum - 06-02-2011, 06:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB