setup($parentFieldArray, $vardef, $displayParams, $tabindex); if( preg_match("/current_user_only.*/", $vardef['name']) || preg_match("/favorites_only.*/", $vardef['name']) ) return $this->fetch('include/SugarFields/Fields/Bool/EditView.tpl'); else return $this->fetch('include/SugarFields/Fields/Bool/SearchView.tpl'); } public function getEmailTemplateValue($inputField, $vardef, $displayParams = array(), $tabindex = 0){ global $app_list_strings; // This does not return a smarty section, instead it returns a direct value if ( $inputField == 'bool_true' || $inputField === true ) { // Note: true must be absolute true return $app_list_strings['checkbox_dom']['1']; } else if ( $inputField == 'bool_false' || $inputField === false){ // Note: false must be absolute false return $app_list_strings['checkbox_dom']['2']; } else { // otherwise we return blank display return ''; } } public function unformatField($formattedField, $vardef){ if ( empty($formattedField) ) { $unformattedField = false; return $unformattedField; } if ( $formattedField == '0' || $formattedField == 'off' || $formattedField == 'false' || $formattedField == 'no' ) { $unformattedField = false; } else { $unformattedField = true; } return $unformattedField; } } ?>