Welcome Guest, Not a member yet? Register   Sign In
set_value() not handling arrays for form field names properly
#1

[eluser]Kenzie[/eluser]
When using an array for a form field name, redisplaying the value with set_value when there's a validation error results in a string of "Array" instead of the actual submitted value.

Code:
$this->form_validation->set_rules('options[]', 'Options', 'required');
<input type="text" name="options[]" value="<?php echo set_value('options[]'); ?>" size="50" />

Tested with CI 1.7.1, PHP 5.2.6
#2

[eluser]The Wizard[/eluser]
try a workarround with form helper and generating them with the selected parameter using set_select.
#3

[eluser]Unknown[/eluser]
I'm having the same issue...could you elaborate?
#4

[eluser]The Wizard[/eluser]
Hello
i dont have the time these days so please look at my last posts, i explained something similar there.
take care




Theme © iAndrew 2016 - Forum software by © MyBB