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">
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.