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 如何让企业微信机器人实现消息汇总整合
  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
  • ¥15 如何用Python爬取各高校教师公开的教育和工作经历
  • ¥15 TLE9879QXA40 电机驱动
  • ¥20 对于工程问题的非线性数学模型进行线性化
  • ¥15 Mirare PLUS 进行密钥认证?(详解)
  • ¥15 物体双站RCS和其组成阵列后的双站RCS关系验证
  • ¥20 想用ollama做一个自己的AI数据库
  • ¥15 关于qualoth编辑及缝合服装领子的问题解决方案探寻
  • ¥15 请问怎么才能复现这样的图呀