'Text', '1'=>'Number', '2'=>'Percent', '3'=>'Currency', '4'=>'Date', '5'=>'Email', '6'=>'Phone', '7'=>'Picklist', '8'=>'URL', '9'=>'Checkbox', '11'=>'MultiSelectCombo', '12'=>'Skype', '13'=>'Time'); if(isset($fieldid) && $fieldid!='') { $mode='edit'; $customfield_columnname=getCustomFieldData($tabid,$fieldid,'columnname'); $customfield_typeofdata=getCustomFieldData($tabid,$fieldid,'typeofdata'); $customfield_fieldlabel=getCustomFieldData($tabid,$fieldid,'fieldlabel'); $customfield_typename=getCustomFieldTypeName($uitype); $fieldtype_lengthvalue=getFldTypeandLengthValue($customfield_typename,$customfield_typeofdata); list($fieldtype,$fieldlength,$decimalvalue)= explode(";",$fieldtype_lengthvalue); $readonly = "readonly"; if($fieldtype == '7' || $fieldtype == '11') { $query = "select * from vtiger_". $adb->sql_escape_string($customfield_columnname); $result = $adb->pquery($query, array()); $fldVal=''; while($row = $adb->fetch_array($result)) { $fldVal .= $row[$customfield_columnname]; $fldVal .= "\n"; } $smarty->assign("PICKLISTVALUE",$fldVal); } $selectedvalue = $typeVal[$fieldtype]; } $smarty->assign("MOD", $mod_strings); $smarty->assign("APP", $app_strings); $smarty->assign("THEME", $theme); $smarty->assign("FLD_MODULE", vtlib_purify($_REQUEST['fld_module'])); if(isset($_REQUEST["duplicate"]) && $_REQUEST["duplicate"] == "yes") { $error=$mod_strings['ERR_CUSTOM_FIELD_WITH_NAME']. $_REQUEST["fldlabel"] .$mod_strings['ERR_ALREADY_EXISTS'] . ' ' .$mod_strings['ERR_SPECIFY_DIFFERENT_LABEL']; $smarty->assign("DUPLICATE_ERROR", $error); $customfield_fieldlabel=vtlib_purify($_REQUEST["fldlabel"]); $fieldlength=vtlib_purify($_REQUEST["fldlength"]); $decimalvalue=vtlib_purify($_REQUEST["flddecimal"]); $fldVal = vtlib_purify($_REQUEST["fldPickList"]); $selectedvalue = $typeVal[$_REQUEST["fldType"]]; } elseif($fieldid == '') { $selectedvalue = "0"; } if($mode == 'edit') $disable_str = 'disabled' ; else $disable_str = '' ; $output = ''; $combo_output = ''; for($i=0;$i'.$cftextcombo[$i].''; } $output .= '
'; if($mode == 'edit') $output .= ''; else $output .= ''; $output .= ''; $output .='
'.$mod_strings['LBL_EDIT_FIELD_TYPE'].' - '.$customfield_typename.''.$mod_strings['LBL_ADD_FIELD'].'
'; if($mode != 'edit') { $output .= ''; } $output .='
'.$mod_strings['LBL_SELECT_FIELD_TYPE'].'
'.$combo_output.'
'; if($mode != 'edit') { $output .= ''; } $output .= '
'.$mod_strings['LBL_LABEL'].'
'.$mod_strings['LBL_LENGTH'].'
 
'; echo $output; ?>