dongxiong1935 2015-09-16 10:04 采纳率: 0%
浏览 67
已采纳

在SugarCRM中添加自定义分组字段

I need to create a custom field Contact in Sugar CRM.

The field will contain 2 inputs and one select box. And the whole thing should be replicated upon clicking the Add button.

I'm new to Sugar CRM and wondering if I can add the field.

Every comment or answer will appreciate. Thanks in advance.


This is the field that I need to add

<img src="https://imageshack.com/i/id92zCAAp" border="0">

</div>
  • 写回答

1条回答 默认 最新

  • doudun1934 2015-09-18 05:08
    关注

    sorry i will paste the code here, so it can be formatted nicely.

    I did it like this, In my editviewdefs file i added a custom field with the following definition :

    array (
            'name' => 'status_info_fieldset_c',
            'label' => 'LBL_STATUS_INFO_FIELDSET',
            'customCode' => '<fieldset id = "statInfoFieldSet">
                                <legend>Status Information</legend>
                            </fieldset>',
          ),
    

    I override the field and added a customCode, this is the container of the fields.

    To group the fields i use js to modify the DOM elements specifically changing the position of the elements like this ,

    // Copy stat info buttons to fieldset
        var statInfoBtnTdParentOld = $('#changeStatusBtn').parent().prev();
        var statInfoBtnTdOld = $('#changeStatusBtn').parent();
        var statInfoBtnTdParent = statInfoBtnTdParentOld.clone();
        var statInfoBtnTd = statInfoBtnTdOld.clone();
        var statInfoBtnTr = $('<tr></tr>');
        statInfoBtnTr.append(statInfoBtnTdParent);
        statInfoBtnTr.append(statInfoBtnTd);
        statInfoBtnTdParentOld.parent().remove();
    

    It depends on how u do it, but I just moved the elements inside the container.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 目详情-五一模拟赛详情页
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line