Programmatically Control Field's Value
Posted: Fri Mar 15, 2024 10:47 am
Hi, I just started using PHPMaker today. I basically needed to manipulate a variable's field value from the database. For example, before the record is displayed to the front end, change the field value not in the database but what it displays to the user.
Say the actually field value is 'over_50' ... if this is the case instead of showing over_50, change it to Age 50 and Over. In Codecharge I could do this in the Before Show Event using
global $users;
if (($users->age->GetValue() == 'over_50') {
$users->age->SetValue('Age 50 and Over');
}
Not that the code above has any reference to PHPmaker, but wanted to get the message across.
Thanks