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

In Codeigniter 2 our forms were able to have


PHP Code:
<input type="text" name="options[]" value="<?php echo set_value('options[]'); ?>" size="50" />
<
input type="text" name="options[]" value="<?php echo set_value('options[]'); ?>" size="50" /> 
and each one would be populated from POST without an issue. With Codeigniter 3, all our forms that did that are now broken and I have to manually put in [0],[1],[2],etc for each form field's set_value(). Was this an intentional change or am I missing something that needed to be changed from CI2 to CI3?

The error
PHP Code:
A PHP Error was encountered
Severity
Notice
Message
: Array to string conversion 

I did look at the form_helper from CI2 and I saw it parsed out the values if it saw an array and returned them differently than they are being done in CI3.
Reply


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



Theme © iAndrew 2016 - Forum software by © MyBB