Also it's worth noting, that you can enter php code into QFfield callback field (RB admin), so in fact you don't have to create any additional file.
https://github.com/Telaxus/EPESI/blob/master/modules/Utils/RecordBrowser/RecordBrowserCommon_0.php#L68
Possible variables to use are as those in the function header:
$form, $field, $label, $mode, $default, $desc, $rb_obj, $display_callback_table
Possible code in QFfield callback edit form to add conditional field
$callback = Utils_RecordBrowserCommon::get_default_QFfield_callback($desc['type']);
call_user_func_array($callback, array(&$form, $field, $label, $mode, $default, $desc, $rb_obj, $display_callback_table));
$autohide_mapping = array(
array('values'=>true,
'mode'=>'show',
'fields'=>array('books_type')
),
);
$form->autohide_fields($field, $default, $autohide_mapping);
Of course it's just a template merged from the post ghristov mentioned and default qffield callback call.
Regards,
Adam