Welcome Guest, Not a member yet? Register   Sign In
Form validation & default values
#1

[eluser]antiver[/eluser]
On the site I'm building, there is a user settings page. During the signup process, the user provides their email address. On the settings page, I need to show the user's current email address setting that's been stored in the database (which I have no idea how to do) so they can just edit it without needing to type the whole thing out.

An excerpt from the settings page:
Code:
Update Email Address
<input type="text" name="email" value="<?=$this->validation->email?>">
<?=$this->validation->email_error?>

I assume I need to either change something in the code above, along with a change in the controller, or just somehow set the value of $this->validation->email in the controller when the page is first loaded.

When building all the forms on the site, I followed the guide at http://ellislab.com/codeigniter/user-gui...ation.html , but don't see anything about setting a default value for a field.

I feel like ^ this ^ is kind of vague, so let me know if it needs clarification. Hopefully you're already familiar with the behavior I'm looking for Smile

Thanks!


Messages In This Thread
Form validation & default values - by El Forum - 05-23-2008, 05:27 PM
Form validation & default values - by El Forum - 05-23-2008, 07:18 PM
Form validation & default values - by El Forum - 05-23-2008, 07:27 PM
Form validation & default values - by El Forum - 05-23-2008, 08:38 PM
Form validation & default values - by El Forum - 05-23-2008, 11:58 PM



Theme © iAndrew 2016 - Forum software by © MyBB