Hello,
To add some javascript on the fields you can do that in the editviewdefs.
custom/modules/Opportunities/metadata/editviewdefs.php
And you can do with customCode:
PHP Code:
'name' => 'field_name',
'customCode' => '<input name="field_name" id="field_name" value="{$fields.field_name.value}" maxlenght="{$fields.field_name.len}" onblur="alert(\'test\')">',
or you can use displayParams if the field is a dropdown
PHP Code:
'name' => 'field_name',
'displayParams' => array('javascript' => 'onblur="alert(\'test\')"'),
Don't forget if you aren't using the system as Developer Mode you need to clear cache after the changes in editviewdefs.
Best Regards,
Diego
Bookmarks