before_update code
Posted: 2015-12-23 23:11
I've looked through the forums, faqs, etc, and I thought I had this right. I guess not.
There are indeed fields in the job table named service_date and next_date.
When I edit a record, instead of getting 1/1/2001 in next_date, it remains blank.
What am I missing?
Once I see this basic hook work, I will be coding a proper calc_next_date(), of course.
Thanks!
Code: Select all
function job_before_update(&$data, $memberInfo, &$args){
$data['next_date'] = calc_next_date($data['service_date']);
return TRUE;
}
function calc_next_date($service_date){
return '1/1/2001';
}
When I edit a record, instead of getting 1/1/2001 in next_date, it remains blank.
What am I missing?
Once I see this basic hook work, I will be coding a proper calc_next_date(), of course.
Thanks!