Hi,
My leads can come from existing or new contacts, and i am trying to set up the lead module so that the user can either select an existing contact (via a popup), which then populates the contact details on the lead form, and sets them to read only, or can delete the related contact and manually enter contact details for a new contact (which we don’t want to convert into a full contact record yet).
To populate the lead form with the selected contacts details i have added the ‘field_to_name_array’ in custom/modules/Leads/views/view.edit.php as below.
All fields are populated, except for the salutation, first name and last name; the salutation is blank and the first and last names have the full name of the contact including the salutation.
I am also populating the fields in editviewdefs.php to account for the user selecting contact using the dynamic search of the textbox, and that works fine.
Why is the popup returning the full name?
In view.edit.php i have (name does not work):
‘field_to_name_array’ =>
array (
‘saluatation’ => ‘salutation’,
‘first_name’ => ‘first_name’,
‘last_name’ => ‘last_name’,
‘phone_work’ => ‘phone_work’,
‘phone_home’ => ‘phone_home’,
‘phone_mobile’ => ‘phone_mobile’,
‘email1’ => ‘Leads0emailAddress0’,
‘primary_address_street’ => ‘primary_address_street’,
‘primary_address_city’ => ‘primary_address_city’,
‘primary_address_state’ => ‘primary_address_state’,
‘primary_address_postalcode’ => ‘primary_address_postalcode’,
‘primary_address_country’ => ‘primary_address_country’,
In editviewdefs.php i have (which works)
‘displayParams’ =>
array (
‘field_to_name_array’ =>
array (
‘saluatation’ => ‘salutation’,
‘first_name’ => ‘first_name’,
‘last_name’ => ‘last_name’,
‘phone_work’ => ‘phone_work’,
‘phone_home’ => ‘phone_home’,
‘phone_mobile’ => ‘phone_mobile’,
‘email1’ => ‘Leads0emailAddress0’,
‘primary_address_street’ => ‘primary_address_street’,
‘primary_address_city’ => ‘primary_address_city’,
‘primary_address_state’ => ‘primary_address_state’,
‘primary_address_postalcode’ => ‘primary_address_postalcode’,
‘primary_address_country’ => ‘primary_address_country’,
),
Cheers