Hi,
I would like to change the layout for Contacts which displays during converting a lead. I am using 6.5. Community Edition. How to edit this layout?
Thanks.
Hi,
I would like to change the layout for Contacts which displays during converting a lead. I am using 6.5. Community Edition. How to edit this layout?
Thanks.
Hi Timothy, thanks for your guidance, I have the same wish to alter the lead conversion page, but in the modules\Leads\metadata\convertdefs.php file I can't find any reference e.g. to the company address fields that I would like to remove. The file seems to refer elsewhere, but I can't find where.
On the other hand I found a file convertlead.tpl file (could be in the cache, can't find it back), which actually provide the HTML code for the page. Although it is not the most elegant solution, I removed some fields that were redundant for me in that code and this worked... until the next day when the original page layout was back.
Can you give a bit more guidance in which specific files I could make some changes?
Which version of SugarCRM are you using? I am in 6.5 CE which should come with that file, and that is the only version that I can speak to with any authority.
That said, I did run across this nugget that might help you How to make create account optional (Not Required) in Lead conversion?
Let me know if that helps
Hi Timothy. That link I had also discovered, but it suggest only changes in the convertdefs.php file, and I do not see any reference there to the fields that are displayed in the contacts, accounts and opportunity parts of this page.
I have CE 6.5.20 as version. Would be great if you could help me further.
Ooops, sorry, I had misread your original post and thought that you didn't have the modules/Leads/metadata/convertdefs.php file at all. My bad. I guess I am still fuzzy about exactly what you are asking for. Is it that you found places to make changes, but the changes aren't reflected on your site? Is it that you have the file, but don't know where to make the changes? Anyway, here are some suggestions and I hope one of them will be of help to you:
I guess if you just want to remove the UI for Address, etc, one place to look would be in the modules/Leads/tpls/convertdef.tpl, which is a SMARTY file where you can remove or add UI logic as needed.
As for the modules/Leads/metadata/convertdefs.php file, it should also be a place to add customization to what fields show up and which ones don't. If changes there are not reflected in your site, check to see if you have a custom/modules/Leads/metadata/convertdefs.php file, because that would take priority over the out-of-the-box file. The convertdef.php file is a standard SugarCRM array definition file that dictates how the form is set up. It's structure should be something like this:
Array for the View Defnition
A section to create a new or link to an established Contact*
A section to create a new or link to an established Account*
A section to link Opportunities
A section to link Notes*
A section to link Calls*
A section to link Meetings*
A section to link Tasks*
*also includes hidden fields to link to Opportunities, Cases, Bugs and Emails to each of these modules.
Removing any of these parts to the array should remove it from the interface -- after you run a Repair.
For example, if you want to take the address out of the Contacts section, that section would look like this:
$viewdefs['Contacts']['ConvertLead'] = array(
'copyData' => true,
'required' => true,
'select' => "report_to_name",
'default_action' => 'create',
'templateMeta' => array(
'form'=>array(
'hidden'=>array(
'<input type="hidden" name="opportunity_id" value="{$smarty.request.opportunity_id}">',
'<input type="hidden" name="case_id" value="{$smarty.request.case_id}">',
'<input type="hidden" name="bug_id" value="{$smarty.request.bug_id}">',
'<input type="hidden" name="email_id" value="{$smarty.request.email_id}">',
'<input type="hidden" name="inbound_email_id" value="{$smarty.request.inbound_email_id}">'
)
),
'maxColumns' => '2',
'widths' => array(
array('label' => '10', 'field' => '30'),
array('label' => '10', 'field' => '30'),
),
),
'panels' =>array (
'LNK_NEW_CONTACT' => array (
array (
array (
'name' => 'first_name',
'customCode' => '{html_options name="Contactssalutation" options=$fields.salutation.options selected=$fields.salutation.value} <input name="Contactsfirst_name" size="25" maxlength="25" type="text" value="{$fields.first_name.value}">',
),
'title',
),
array (
'last_name',
'department',
),
array (
// array('name' => 'primary_address_street', 'label' => 'LBL_PRIMARY_ADDRESS'),
'phone_work',
'phone_mobile',
),
// array (
// array('name'=>'primary_address_state', 'label' => 'LBL_STATE'),
// 'phone_mobile',
// ),
array (
// array('name'=>'primary_address_postalcode', 'label' => 'LBL_POSTAL_CODE'),
'phone_other',
'phone_fax',
),
// array (
// array('name'=>'primary_address_country', 'label' => 'LBL_COUNTRY'),
// 'phone_fax',
// ),
array (
'email1',
'lead_source',
),
array(
'description'
),
)
),
);
And that should keep your form in two columns [moving the phone numbers around] and remove the address fields.
Hope this helps -- and let me know if I am still not understanding your question.
Glad to be of service.
Can you mark this closed then?