Hello,
I use onBeforeInsert in my table_edit.php to generate a value which should be added to the database (will come from another subsystem so it's not available during the form input).
currently i do the following but thing there is a better solution .
Code:
function onBeforeInsert()
{
global $app
$app->tform->errorMessage = myfunction($_POST) ;
$this->dataRecord['value'] = $_SESSION['value'] ;
unset ($_SESSION['value']) ;
}
Code:
myfunction($_VAR)
{
global $_SESSION ;
...
if (ok)
$_SESSION['value'] = "foo";
(else)
return "error foo :-(" ;
}
Recent comments
1 hour 36 min ago
2 hours 35 min ago
6 hours 22 min ago
7 hours 36 min ago
11 hours 13 min ago
18 hours 28 min ago
1 day 3 hours ago
1 day 4 hours ago
1 day 19 hours ago
1 day 22 hours ago