tags:

views:

23

answers:

1

Hi,

CI form_validation is working perfectly... but how can I put some values into the fields before the first submission? (edit page)

Thnaks.

+1  A: 

You could retrieve the values via using the model, etc.

The form helper can help you with the values. for example:

//Controller
$data['user'] = $this->user_model->get_user($id);
$this->load->view('yourview', $data);

 // View
<input type='Text' name='username' value='<?php echo set_value('name', $user->name);?>'>
Thorpe Obazee