Hi! I have this template:
<tr><td>[blk.col1;block=tr;ondata=myfunc]</td><td>[blk.col2]</td></tr>
|
I'd like to use the following user function to manipulate the records:
function myfunc($BlockName, &$CurrRec, $RecNum)
{
$CurrRec["col1"] = "res1.1";
}
|
The block source type is array, defined this way:
$blkdata = array();
$blkdata[] = array("col1"=>"res1", "col2"=>"res2");
|
I merge the block:
$TBS->MergeBlock("blk", "array", "blkdata");
|
This returns the following message, and doesn't call the user function (leaves the col1 field as defined):
Warning: call_user_func_array(): First argumented is expected to be a valid callback, '' was given in /lib/tbs_class.php on line 431
Am I missed to define something in the header of the user function? When using MySQL as data source, it works well anyway.
Thank you for your help in advance.