diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php
index e91184ede12..40276b6205d 100644
--- a/htdocs/core/class/html.formcompany.class.php
+++ b/htdocs/core/class/html.formcompany.class.php
@@ -564,16 +564,21 @@ class FormCompany
}
}
- // Refresh contacts list on thirdparty list change
- $htmloption='';
$events=array();
+ // Add an entry 'method' to say 'yes, we must execute url with param action = method';
+ // Add an entry 'url' to say which url to execute
+ // Add an entry htmlname to say which element we must change once url is called
+ // Add entry params => array('cssid' => 'attr') to say to remov or add attribute attr if answer of url return 0 or >0 lines
+ // To refresh contacts list on thirdparty list change
$events[]=array('method' => 'getContacts', 'url' => dol_buildpath('/core/ajax/contacts.php',1), 'htmlname' => 'contactid', 'params' => array('add-customer-contact' => 'disabled'));
+
if (count($events)) // If there is some ajax events to run once selection is done, we add code here to run events
{
print '