Results 1 to 6 of 6

Thread: 怎样新增一个自定义字段类型

  1. #1
    hatball is offline Member
    Join Date
    Aug 2010
    Posts
    9

    Default 怎样新增一个自定义字段类型

    怎样新增一个自定义字段类型?就如地址型,代码型
    有哪位高人指点下

  2. #2
    hatball is offline Member
    Join Date
    Aug 2010
    Posts
    9

    Default Re: 怎样新增一个自定义字段类型

    Quote Originally Posted by hatball View Post
    怎样新增一个自定义字段类型?就如地址型,代码型
    有哪位高人指点下
    备注下。我的是sugar520k版本,mysql的。系统是2003。
    http://www.sugarcrm.com/wiki/index.p...tom_Field_Type
    根据这里的去做。但是在字段类型里面还是没有这time选项。求教

  3. #3
    siyang is offline Senior Member
    Join Date
    Apr 2010
    Posts
    46

    Default Re: 怎样新增一个自定义字段类型

    Quote Originally Posted by hatball View Post
    备注下。我的是sugar520k版本,mysql的。系统是2003。
    http://www.sugarcrm.com/wiki/index.p...tom_Field_Type
    根据这里的去做。但是在字段类型里面还是没有这time选项。求教
    这个'type'=>'datetimecombo',
    qq:35519656

  4. #4
    hatball is offline Member
    Join Date
    Aug 2010
    Posts
    9

    Default Re: 怎样新增一个自定义字段类型

    不是'timer' => 'Timer'这个么?

  5. #5
    hatball is offline Member
    Join Date
    Aug 2010
    Posts
    9

    Default Re: 怎样新增一个自定义字段类型

    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'];定义和所付的值;
    能否请大侠们给看看。看这个数组的值是在哪个文件里面给付的。或者是存储在数据库里面哪个表呢 ?

  6. #6
    lssman is offline Senior Member
    Join Date
    May 2010
    Posts
    20

    Default Re: 怎样新增一个自定义字段类型

    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
    );

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 2010-08-13, 04:06 AM
  2. 怎么样将一个字段审核?
    By steven1041 in forum Chinese
    Replies: 1
    Last Post: 2010-05-28, 08:59 AM
  3. 怎样把一个关系型字段变成多选
    By leenuxwu in forum Chinese
    Replies: 7
    Last Post: 2009-07-08, 07:18 AM
  4. Replies: 0
    Last Post: 2009-03-30, 09:31 AM
  5. Replies: 3
    Last Post: 2008-11-24, 02:42 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •