public function set_label($label)
{
// Try to guess field label from it's name
if (is_null($label)) {
// remove the leading underscore(if it's there)
$label = preg_replace('~^_~', '', $this->name);
// remove the leading "crb_"(if it's there)
$label = preg_replace('~^crb_~', '', $label);
// split the name into words and make them capitalized
$label = mb_convert_case(str_replace('_', ' ', $label), MB_CASE_TITLE);
}
$this->label = $label;
}