[eluser]Tommy_DK[/eluser]
Is it possible to use the validation class when updating a user? The problem is that the form should start out with being populated by information from the database. When the user submits and it shows a error message it should not throw-away the user input.
I think about something like this, but need to know what to check for...
(The sex-field is a radio-button... and that does not work)
<?
//Will be filling in the data from the database
//Unless it is being reloaded because of the validation
//Done to not lose user-input
If ($this->validation->sex = ''){
$sex = $profile->sex;
$first_name = $profile->first_name;
$last_name = $profile->last_name;
$introduction = $profile->introduction;
}
else {
$sex = $this->validation->sex;
$first_name = $this->validation->first_name;
$last_name = $this->validation->last_name;
$introduction = $this->validation->introduction;
}
?>