怎样新增一个自定义字段类型?就如地址型,代码型
有哪位高人指点下
怎样新增一个自定义字段类型?就如地址型,代码型
有哪位高人指点下
备注下。我的是sugar520k版本,mysql的。系统是2003。
http://www.sugarcrm.com/wiki/index.p...tom_Field_Type
根据这里的去做。但是在字段类型里面还是没有这time选项。求教
不是'timer' => 'Timer'这个么?
5. To get the new field type to show in the Studio drop down open modules\ModuleBuilder\views\view.modulefield.php and add your type to the $field_types array:
$field_types = array('varchar'=>'TextField', 'int'=>'Integer', 'float'=>'Decimal','bool'=>'Checkbox','enum'=>'Dro pDown',
'date'=>'Date', 'phone' => 'Phone', 'currency' => 'Currency', 'html' => 'HTML', 'radioenum' => 'Radio',
'relate' => 'Relate', 'address' => 'Address', 'text' => 'TextArea', 'url' => 'Link', 'timer' => 'Timer');
再请教下。他这第五步是把"timer"=>"Timer"添加到$field_types的 数组里面,
但是现在我看了下这文件的这段代码被改成:
/*
$field_types = array('varchar'=>'YourField', 'int'=>'Integer', 'float'=>'Decimal','bool'=>'Checkbox','enum'=>'Dro pDown',
'date'=>'Date', 'phone' => 'Phone', 'currency' => 'Currency', 'html' => 'HTML', 'radioenum' => 'Radio',
'relate' => 'Relate', 'address' => 'Address', 'text' => 'TextArea', 'url' => 'Link');
*/
$field_types = $GLOBALS['mod_strings']['fieldTypes'];
只是我到现在都还没找到 $GLOBALS['mod_strings']['fieldTypes'];定义和所付的值;
能否请大侠们给看看。看这个数组的值是在哪个文件里面给付的。或者是存储在数据库里面哪个表呢 ?
custom/modules/ModuleBuilder/language/en_us.lang.php
$mod_strings['fieldTypes'] = array(
'varchar'=>'TextField',
'int'=>'Integer',
'float'=>'Float',
'bool'=>'Checkbox',
'enum'=>'DropDown',
'multienum' => 'MultiSelect',
'date'=>'Date',
'phone' => 'Phone',
'currency' => 'Currency',
'html' => 'HTML',
'radioenum' => 'Radio',
'relate' => 'Relate',
'address' => 'Address',
'text' => 'TextArea',
'url' => 'URL',
'iframe' => 'IFrame',
'encrypt'=>'Encrypt',
'datetimecombo' =>'Datetime',
'decimal'=>'Decimal',
'DateTime_c' =>'Date_c',//MY FIELD
);
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks