Custom field format in Forms2 lists

I extended render function in lists in order to show fields with custom format using sprintf standard function.
Then we could define custom format in this way:

$form->formatField("MyCurrencyField", "%d €");

The modification is the following:
File: Zoop/gui/plugins/functions.forms_list.php
Line: ~220
Code fragment:


function smarty_function_forms_list($params, &$smarty)
{
...

switch($field->type)
{
case "timestamptz":
case "date":
if(isset($field->format))
$lvalue = sql_format_date($record->values[$name]->value, $field->format);
else
$lvalue = $record->values[$name]->value;
break;
default:
//FIX: custom format with sprintf
if(isset($field->format))
{
$lvalue = sprintf($field->format, $record->values[$name]->value);
}
else
{
$lvalue = $record->values[$name]->value;
}
}

...

}

Hope this help...