Adding Custom Code for field in Edit View

Customizing the HTML output of a field in Edit View is quite simple in SuiteCRM.
Navigate to editviewdefs.php for the module you need to modify field for.
This file should be on custom path like

custom/module/MODULE_NAME/metadata/editviewdefs.php

If this does not exists, copy the file from core module following above path without custom.

Now suppose there is field called vehicle_origin which you need a custom HTML output in Edit View.

Modify the field by adding "customCode" key in the edit view to field.

 array (
            'name' => 'vehicle_origin,
            'label' => 'LBL_VEHICLE_ORIGIN',
     'customCode' => ' <input type="text" name="vehicle_origin" class="myclass" id="vehicle_origin"  value="{$fields.vehicle_origin.value}">',
          ),


Comments