Welcome Guest, Not a member yet? Register   Sign In
Validation form with fields filled
#1

[eluser]indapublic[/eluser]
There is form with update user profile.

Code:
<div>Username: &lt;?=$this->validation->username_error;?&gt;&lt;input type="text" name="username" value="&lt;?=$this-&gt;validation->username;?&gt;" /></div>

How can I fill fields before the form show?

Code
Code:
$user = $this->user_model->get_user_data($user_id);
$this->validation->username = $user->username;
$rules["username"] = "trim|required|xss_clean";
$this->validation->set_rules($rules);
$fields["username"] = "username";
$this->validation->set_fields($fields);
$this->load->view("users/edit", $user);
is not working.


Messages In This Thread
Validation form with fields filled - by El Forum - 01-12-2011, 07:40 AM
Validation form with fields filled - by El Forum - 01-12-2011, 09:23 AM
Validation form with fields filled - by El Forum - 01-12-2011, 09:14 PM



Theme © iAndrew 2016 - Forum software by © MyBB