Home
Discussion
Welcome, Guest
Please Login or Register.    Lost Password?
Re:auto-populate fields of an item from a pop-up in SugarCRM (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:auto-populate fields of an item from a pop-up in SugarCRM
#38
Ycrm (User)
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Re:auto-populate fields of an item from a pop-up in SugarCRM 1 Year, 1 Month ago Karma: 0  
Make a copy of the modules/Opportunities/metadata/editviewdefs.php to custom/modules/Opportunities/metadata/editviewdefs.php if there is no editviewdefs.php under the custom area.

In your custom/modules/Opportunities/metadata/editviewdefs.php, add the following:

Code:

function setField(count) { var acc = document.getElementById("account_name").value; document.getElementById("my_field_c").value = acc+'-'+count; }
And on the field input declaration later in the same editviewdefs.php file, add customCode like
Code:

'name' => 'my_field_c', 'customCode' => '<input type="text" name="my_field_c" id="my_field_c" size="30" maxlength="11" value="{$fields.my_field_c.value}" title="" tabindex="113" onblur="setField(0);" />', 'label' => 'LBL_MY_FIELD',
So your my_field_c changes with the selected account_name.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
      Topics Author Date
    thread link
auto-populate fields of an item from a pop-up in SugarCRM
Developer 2011/03/31 12:03
    thread link
thread linkthread link Re:auto-populate fields of an item from a pop-up in SugarCRM
Ycrm 2011/03/31 13:11
Go to top Post Reply
get the latest posts directly to your desktop