sugarcrm - How to add condition for a field in the layout of SuiteCRM.? -
in in studio have created fields in 1 module , add fields in layout. want display fields according selection, example: if user select option-1 dropdown field has display 3 field, , if user select option-2 dropdown field has display 6 fields. need add condition in layout field. can't find option there.. please me find out. attached example image below.
you need modify view definitions add script edit view of module.
example:
$viewdefs ['<module name>'] = array( '<view name>view' => array( 'templatemeta' => array( ... 'includes' => array( 0 => array( 'file' => 'path/to/your/script.js', ), 1 => array( 'file' => 'path/to/your/script.js', ), ), ... ), ... ), ... );
you can use jquery or javascript library hide or show fields. if using suiter or suitep theme can add/remove hidden class elements.
just make sure add fields view wish show or hide.
to make upgrade save modify or create
- custom/modules//metadata/editviewdefs.php edit view
- custom/modules//metadata/detailviewdefs.php detail view
Comments
Post a Comment