Where to edit layout for the "Convert Lead" page

When you convert a lead it opens a page with a number of options and fields - where is this layout located in Studio?

You can get it on file system modules/Leads/metadata/convertdefs.php

1 Like

Thanks very much - exactly what I needed.

I edited modules/Leads/metadata/convertdefs.php and then added it to custom/modules/Leads/metadata/convertdefs.php to make it upgrade safe and it works fine

Cheers!!! Keep rolling

Can I access this module with the Studio?

Sorry guys. I got my (negative) answer from this post. https://suitecrm.com/forum/suitecrm-7-0-discussion/8701-convert-lead-layout-missing

If I want to convert leads to custom module, beside adding lines on file convertdefs.php on modules/leads/metadata , is there anything else i should do ?
For example the lines:
$viewdefs (‘Sites’) (‘ConvertLead’) = array(
‘copyData’ => true,
‘required’ => true,
‘default_action’ => ‘create’,
‘templateMeta’ => array(
‘form’=>array(
‘hidden’=>array(
‘’,
‘’,
‘’,
‘’,
‘’
)
),
‘maxColumns’ => ‘2’,
‘widths’ => array(
array(‘label’ => ‘10’, ‘field’ => ‘30’),
array(‘label’ => ‘10’, ‘field’ => ‘30’),
),
),
‘panels’ =>array (
‘LNK_NEW_RECORD’ => array (
array (
array (
‘name’ => ‘name’,

            )
        ), 
        array (
            'nama_relasi_c',
        ),
        array(
            'billing_address_name_c'
        ),
    array(
            'shipping_address_name_c'
        ),
    )
),

);

Hi, I need to add custom field “aplicationno_c” into this original code modules/Leads/metadata/convertdefs.php, but adding this field doesnot shows in the convert led page, do I need to map this field somewhere else also …

$viewdefs['Opportunities']['ConvertLead'] = array(
    'copyData' => true,
    'required' => false,
    'templateMeta' => array(
        'form'=>array(
            'hidden'=>array(
            )
        ),
        'maxColumns' => '2', 
        'widths' => array(
            array('label' => '10', 'field' => '30'), 
            array('label' => '10', 'field' => '30'),
        ),
    ),
    'panels' =>array (
        'LNK_NEW_OPPORTUNITY' => array (
            array (
                'name',
                'currency_id'
            ), 
            array (
                'sales_stage',
                'amount'
            ),
            array (
                'date_closed',
                ''
            ),
            array (
                'description'
            ),
        )
    ),
);

Hello urdhvatech,
I want to remove checkbox from convert lead page.
Which file need to edit for this?

Hello,
Can you specify which checkbox and for which module? If you can share a screenshot. I may help you.

Hello urdhvatech,
Thanks for quick reply,
While converting lead on convert lead page I want to disable checkbox which is allow to create new contact or account record.

You can play around this file. modules/Leads/metadata/convertdefs.php
As said, to make it upgrade safe. put this file in a custom directory.

Actually I have requirement where user only can select contact or account.
user can’t create new account or contact record while converting lead.

So I want to hide "Create Contact OR " text and checkbox from convert lead page.
I think I need to change .tpl file.

I did some changes in modules\Leads\tpls\ConvertLead.tpl, but it’s not working for me.

I haven’t tried that specific customization. But I guess you need to play around .tpl file and the view.convertlead.php

Ok. I’ll check and update.
And thanks for your quick replies.

:slight_smile:

Hello urdhvatech,
I have extend .tpl file, but after extend view of convert lead page is change.
It shows underlines, remove padding and other css.
Do you have any idea why it changed?

Hello @urdhvatech
I got a solution,

If we want to change in leadconvertion view we need to extend theme folder and change in below file.
“custom\themes\SuiteP\modules\Leads\tpls\ConvertLead.tpl”.

Thanks for reply. :slight_smile:

Glad to hear it! Cheers!!

As this is the top result on google for customizing the convert lead page…
A tip for people looking to customize this…

If you edit these files to customize the lead conversion page/forms…

  • custom/modules/Leads/metadata/convertdefs.php (this is all you need to edit for customizing which fields are shown in what layout)
  • custom/modules/Leads/tpls/ConvertLead.tpl
  • custom/modules/Leads/views/view.convertlead.php

If you don’t see your changes… it is likely because the include/TemplateHandler/TemplateHandler.php is checking in the cachedir to see if a template is already built and if so it doesn’t rebuild it (unless in dev mode).

So you can remove or rename this file (don’t remove the whole cache dir) to force TemplateHandler to rebuild the template based on your changes. e.g. for Contacts…

mv cache/themes/SuiteP/modules/Contacts/ConvertLead.{tpl,tpl~}

If you want to do this for the other modules on that page, you can rm or mv the other files as well (e.g. for Account and Opportunity).

  • cache/themes/SuiteP/modules/Opportunities/ConvertLead.tpl
  • cache/themes/SuiteP/modules/Accounts/ConvertLead.tpl
  • etc

Hope that saves someone else some hours.