arrays and set_value - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: arrays and set_value (/showthread.php?tid=15668) |
arrays and set_value - El Forum - 02-11-2009 [eluser]Ward[/eluser] Hi I cant work out what I'm missing here. set_value(price[]) returns an array and not an integer when repopulating the form. Acording to my reading of the manual it ought to work. Code: class Welcome extends Controller { Code: <form method=POST action="<?current_url()?>" /> Thanks arrays and set_value - El Forum - 03-23-2009 [eluser]Kenzie[/eluser] I'm seeing the same issue. Code: $this->form_validation->set_rules('options[]', 'Options', 'required'); When the form is redisplayed because of an error, the input field simply says 'Array', instead of the actual value. arrays and set_value - El Forum - 03-23-2009 [eluser]xwero[/eluser] try it with the numbers Code: <p><input type="text" name="price[0]" value="<?=set_value('price[0]')?>"> arrays and set_value - El Forum - 03-23-2009 [eluser]Kenzie[/eluser] That didn't work, and actually prevented any input from being redisplayed. arrays and set_value - El Forum - 03-23-2009 [eluser]cwt137[/eluser] Hello, Please try my patch: http://ellislab.com/forums/viewreply/518380/ |