Welcome Guest, Not a member yet? Register   Sign In
set_value() in CI3 has issues with input arrays
#3

(10-14-2016, 02:04 PM)cartalot Wrote: hi - hey i can confirm this does work for me in CI 3 so there must be something else going on. Are you using CI form validation? Are you sure you have 'field' => 'options[]' in the form validation? Are you sure you are loading form helper? If none of those things solve it then try naming the field something different then 'options' - maybe you have a conflict. And if that does not work then post more of your code and the specific error messages you are getting.


Not sure what you mean by 'field' => 'options[]'?

I use
PHP Code:
$this->form_validation->set_rules('options[]''Options''required'); 

I'm referencing https://www.codeigniter.com/userguide3/l...ield-names for this post by the way. Also, there is no other error messages, it's just that set_value() returns the whole array instead of the individual fields. Also, I'm using form_validation obviously and form_helper is loaded automatically(unless this changed in CI3) when you load that library.
Reply


Messages In This Thread
RE: set_value() in CI3 has issues with input arrays - by zknight - 10-14-2016, 02:27 PM



Theme © iAndrew 2016 - Forum software by © MyBB