In the "SugarCRM in the views of thecall JS" has been explained how to add JS code in the views, but in actual demand is still not enough.
(1) Add HTML code to a specific field in the page and trigger the corresponding JS method, and of course which tags in the HTML code are used, depending on the requirements.
(2) Only by loading the JS method may not be able to meet the requirements, while in order to consider the user experience and from other data tables or other types of files to extract data and populate the page, you can use jquery to complete the data filling work, and sometimes need to use Ajax to complete the asynchronous request processing data.
(3) Tip: Generally the above two steps are considered at the same time.
The following shows how to achieve national, provincial and municipal level three linkage:
(1) In order to be able to successfully put data into the data table, to ensure that three fields have been established (country, state, city), the method can be built through the module generator, or through the studio, or you can manually establish the field.
(2) in the custom/modules/modulename/metadata/editviewdefs.php directory, if no editviewdefs.php can be
modules/modulename/metadata/ editviewdefs.php copy came in to modify (there are two editviewdefs.php, but SugarCRM first load the custom editviewdefs.php), and then add code related code:
A) include JS, which contains two JS packets, one is Jquery.js, the other is test3.js;
b) In three fields, add a select tag, for example:
(3) Test3.js processing method, which uses JS, jquery and Ajax, but before this test3.js and Jquery.js first put to the specified directory, detailed code and comments in the test3.js, see for themselves.
(4) There is also a world.xml file to be placed in the root directory of PHP.
SugarCRM to achieve level three linkage in Editviews