yep I think we are close enough...
I created a callback function that returns the data in the autopopulated list of the I want as you told me how to do it now when I select something from the list the textbox appears empty but has the correct value..
I used a different callback in table view from edit view because I want to have the linked label is this the issue?
my code is like that
public static function adv_callback($record) {
return array('format_callback' => array('Custom_GrafeioProjects_CReceiptsCommon', 'proj_name_callback_no_link'));
}
public static function proj_name_callback_no_link($record) {
return self::returnname($record, false); // in this case you can't use third param in proj_name_callback
}
public static function proj_name_callback($v, $nolink) {
$callback = Utils_RecordBrowserCommon::create_linked_label('premium_projects', array('Project Name','Address1') , $v['work'], $nolink);
return $callback ;
}
public static function returnname($record, $nolink) {
$parts = explode("/",$record);
$recid = $parts['1'];
$currecord = Utils_RecordBrowserCommon::get_record('premium_projects', $recid, $htmlspecialchars = true);
$keys= array_keys($currecord['customer']);
//$namestring="";
foreach ($keys as $value) {
$keyparts= explode(":",$value);
$contactid = $keyparts['1'];
$currcontact = Utils_RecordBrowserCommon::get_record('contact', $contactid, $htmlspecialchars = true);
$namestring .= ' ' . $currcontact['first_name'] . ' ' . $currcontact['last_name'] ;
}
$worktypes= Utils_CommonDataCommon::get_array('Typeofwork') ;
return $worktypes[$currecord['worktype']] . " " . $currecord['address1'] . ' ' . $namestring ;
}