Hello,
To have direct influence on the HTML of any of the fields in RecordBrowser, you will need to use QFfield callback. Unfortunately we don't have a good write-up on how to apply this method, but looking by the example it's pretty simple:
public static function QFfield_webaddress(&$form, $field, $label, $mode, $default) {
if ($mode=='add' || $mode=='edit') {
$form->addElement('text', $field, $label);
if ($mode=='edit') $form->setDefaults(array($field=>$default));
} else {
$form->addElement('static', $field, $label);
$form->setDefaults(array($field=>self::display_webaddress(array('webaddress'=>$default), null, array('id'=>'webaddress'))));
}
}
The first bit is when user is in add/edit mode. Adding appropriate parameters to the addElement() call will allow you to add some properties to HTML tag, for instance:
$form->addElement('text', $field, $label, array('onblur'=>'updatePrice();'));
The last bit might be a bit confusing:
$form->setDefaults(array($field=>self::display_webaddress(array('webaddress'=>$default), null, array('id'=>'webaddress'))));
To clarify it a bit:
$display_value = self::display_webaddress(array('webaddress'=>$default), null, array('id'=>'webaddress'));
$form->setDefaults(array($field=>$display_value));
The $default is the raw value as taken from the database. The $display_value is what will be displayed to the user. In the case of webaddress, the raw value will be for instance
epe.si, while the display value is
<a ...>http://epe.si</a>.
Finally, to have a field use the prepared QFfield callback, you can either add another key 'QFfield_callback' in the field definition, where the RecordSet is installed or you can call Utils_RecordBrowserCommon::set_QFfield_callback($tab, $field, $callback).
Hope this helps,
Arek