SugarCRM module layouts snippets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$viewdefs[ $module_name ][ 'EditView' ] = array( | |
// CONTENT | |
'panels' => array( | |
// PANEL | |
'lbl_panel_1' => array( | |
// ROW | |
array( | |
// AUTOMATIC FIELD | |
'my_field_1', | |
// CUSTOM DATA FIELD | |
array ( | |
'name' => 'my_custom_data_field', | |
'customCode' => '<input name="first_name" id="first_name" size="25" maxlength="25" type="text" value="{$fields.my_custom_data_field.value}" />', | |
), | |
), | |
), | |
) | |
); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$viewdefs[ $module_name ][ 'EditView' ] = array( | |
// CONTENT | |
'panels' => array( | |
// PANEL | |
'lbl_panel_1' => array( | |
// ROW | |
array( | |
// AUTOMATIC FIELD | |
'my_field_1', | |
// CUSTOM DATA FIELD | |
array ( | |
'name' => 'my_custom_dropdown_field', | |
'customCode' => '{html_options name="dropdown" id="dropdown" options=$fields.my_custom_dropdown_field.options selected=$fields.my_custom_dropdown_field.value}', | |
), | |
), | |
), | |
) | |
); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$viewdefs[ $module_name ][ 'EditView' ] = array( | |
// CONTENT | |
'panels' => array( | |
// PANEL | |
'lbl_panel_1' => array( | |
// ROW | |
array( | |
// AUTOMATIC FIELD | |
'my_field_1', | |
// CUSTOM HTML FIELD | |
array ( | |
'name' => 'my_custom_html_field', | |
'customCode' => '<img src="my_image.png" />', | |
), | |
), | |
), | |
) | |
); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$module_name = 'my_module'; | |
$viewdefs[ $module_name ][ 'EditView' ] = array( | |
// STRUCTURE | |
'templateMeta' => array( | |
'maxColumns' => '2', | |
'widths' => array( | |
array( | |
'label' => '10', | |
'field' => '30' | |
), | |
array( | |
'label' => '10', | |
'field' => '30' | |
) | |
) | |
), | |
// CONTENT | |
'panels' => array( | |
// PANEL 1 | |
'lbl_panel_1' => array( | |
// ROW 2 COLS | |
array( | |
'my_field_1', | |
'my_field_2' | |
), | |
// ROW 2 COLS WITH 1 EMPTY | |
array( | |
'', // EMPTY FIELD | |
'my_field_3' | |
), | |
), | |
// PANEL 2 | |
'lbl_panel_2' => array( | |
// ROW 1 COL | |
array( | |
'my_field_4' | |
) | |
), | |
) | |
); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Very good, this is a piece of code very useful, I could put two fields in a cell, Thank you :)