This is an example of how to create a new field type that automatically creates a customized field value by executing PHP code
// Method to handle field's values before they are saved into the DB
function onBeforeSaveField( &$field, &$post, &$file, &$item )
{
// execute the code only if the field type match the plugin type
if ( !in_array($field->field_type, self::$field_types) ) return;
if ( !is_array($post) && !strlen($post) ) return;
$post = array();
$post[0] = 'GMP'.$item->catid.'-'.$item->id;
}