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 请问我该如何添加自己的数据去运行蚁群算法代码
  • ¥20 用HslCommunication 连接欧姆龙 plc有时会连接失败。报异常为“未知错误”
  • ¥15 网络设备配置与管理这个该怎么弄
  • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来