Hi, I've had a days off, now I'm back.
It looks like you've solved all your issues. Those methods that you refer are proper methods.
There are more options that you could do.
1. If those values are strictly related to the record, but you should show them only for certain records you could use several details tabs. Like for contacts, we've got details tab.
Then you're able to hide some of the tabs (and all fields there) basing on the value of the record.
For instance you should override one field's QFfield method and do something like that:
public static function QFfield_my_field(&$form, $field, $label, $mode, $default, $desc, $rb) {
if ( /* put here your rule on $default */ ) {
$rb->hide_tab('Tab name');
}
// call default field callback to show data
$method = Utils_RecordBrowserCommon::get_default_QFfield_callback($desc['type']);
$args = func_get_args();
call_user_func_array($method, $args);
}
2. One thing more that could make you happy is that you can show addons in edit mode. You should put a callback
array('Custom_MyModuleCommon', 'addon_label') as addon_label and return
public static function addon_label($record, $rb_obj) {
$ret = array();
$ret['label'] = __('My translated label');
$ret['show'] = true; // you don't have to show a tab. You can use this method to just add some buttons to the action bar
$ret['show_in_edit'] = true; // show addon in edit mode also!
return $ret;
}
Happy coding,
Adam