[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 {
function index(){
$this->load->library('form_validation');
$this->load->helper('url');
$this->form_validation->set_rules('price[]', 'P', 'required');
if ($this->form_validation->run() == FALSE){
$this->load->view('welcome_message');
}
}
}
Code:
<form method=POST action="<?current_url()?>" />
<p><input type="text" name="price[]" value="<?=set_value('price[]')?>">
<p><input type="text" name="price[]" value="<?=set_value('price[]')?>">
<p><input type="submit">
</form>
Thanks