mmkay, this is a rather complex task but if you know a bit of ajax you should be able to do it. Assuming that, the only knowledge of sugar you'll need to know is that you'll have to modify editviewdefs.php. You can input javascript tags in your editviewdefs.php like thus: PHP Code:
'panels' =>
array (
'default' =>
array (
0 =>
array (
0 => array (
'name' => 'course',
'studio' => 'visible',
'label' => 'LBL_COURSE',
'displayParams' => array('javascript'=>'onchange="
if(this.value != \'\')
//Make Ajax/jQuery call and populate fields with the data.;
"'),
),
Most of this should already be in there, you'll just have to edit the displayParams field with whatever javascript you come up with.
You can put the javascript inline here or you can define it in a file (although if you define it in a file you'll have to include that file in the definitions as well, and i can't remember how to do that; I would normally reference the wiki but that's not an option anymore
).
Bookmarks