Two questions,
- Is there a way to get dependency dropdowns to work in the Conver Leads convertdefs.php file?
I did not know how to get this done and everything I tried failed.
So that leads to question #2.
2. How to add custom JavaScript files to load in the custom/modules/Leads/metadata/convertdefs.php?
I tried several ways to get it to work but nothing loaded. I finally copied the modules/Lead/views/view.convertlead.php over to the custom folder and added this at the top of the display() method:
// Cannot seam to get JavaScript to load up using the medata/convertdefs.php file // So using this as a work around. echo ('<script type="text/javascript"> // Work around to load up custom JS var sc = document.createElement("script"); sc.setAttribute("src", "custom/modules/Leads/js/convert_leads.js"); sc.setAttribute("type", "text/javascript"); document.head.appendChild(sc); </script>');
This does what I need it to do and the JavaScript handles the drop-down dependency.
Tony