[eluser]CodeIgniterNewbie[/eluser]
siptik, have you tried your code? My code is basically the same thing. It's not working for me. If it's working for you, then I am doing something wrong.
[quote author="siptik" date="1347263545"]You must do validation for each field.
For example:
Code:
$this->form_validation->set_rules("v[a]", 'Foo Field Name', 'callback_change_foo');
$this->form_validation->set_rules("v[b]", 'Foo Field Name', 'callback_change_foo');
$this->form_validation->set_rules("v[c]", 'Foo Field Name', 'callback_change_foo');
public function change_foo($foo)
{
return "some new value for $foo";
}
<form method="post" action="">
<input name="v[b]" type="text">
<input name="v[a]" type="text">
<input name="v[c]" type="text">
<input name="add" type="submit">
</form>
result:
Array ( [v] => Array ( [b] => some new value for sdf [a] => some new value for aaa [c] => some new value for ssss ) [add] => Отправить )[/quote]