Hi all,
I have a function in the table "pail" that puts a leading zero to a one-digit number when I save a new entry.
<?php
class tables_pail {
function beforeSave($record){
$paildg = sprintf('%02d', $record->_values['paildigits']);
$record->setValue('paildigits', $paildg);
}
}
?>
This function works fine in the table "pail," but when I call this table as a widget grid inside table "locus", it doesn't work there. Among other things, I have tried copying the same code to "locus.php", but with no result. Can you please tell me what I am missing?
Thank you!