customization in create lead form

I want to customize  create lead form.

I have added a check box on the bottom of Primary Address.

then my task is:-

If that check box is enable then Alternate Address  is show otherwise Alternate Address is hidden.

I am not able to get the file in which file i have to change . Please suggest me.

Parents Reply Children
  • Hello kushank jain,

    As Gerardo suggested, you need to create folder as create-actions in /custom/modules/Leads/clients/base/view/

    path will look like below

    /custom/modules/Leads/clients/base/view/create-actions

    Then create new file as create-actions.js

    Here you need to extend view from CreateView,

    So now our file will be look like

    {(
       extendsFrom:'CreateView',
       initialize:function (options) {
            this._super('initialize', [options]);
            this.model.on('change:name_of_checkbox', this.name_function_with_functionality, this);
      },
       name_function_with_functionality:function(){
         //your custom code 
       },
    })
    
    

    Give repair and rebuild.

    Note: In sugar7.7,there will not be create-actions.js For your reference

    CreateActionsView changes in Sugar 7.7.0 « Sugar Developer Blog – SugarCRM

    So Its better to have create folder and create.js in the same path,It will look like

    /custom/modules/Leads/clients/base/view/create/create.js

    and paste the above code here too

    Thanks!.