I would like to give a title to group of fields that are somehow related to each other. For example, I want the fields case and classification come under the title Case Details. I am using SugarCRM 7.9.2.0 Pro.
Any idea?
Thank you in advance.
I would like to give a title to group of fields that are somehow related to each other. For example, I want the fields case and classification come under the title Case Details. I am using SugarCRM 7.9.2.0 Pro.
Any idea?
Thank you in advance.
Thank you for your replay Francesca Shiekh.
I tried the above approach.
The result looks like:
I think it looks a little bit messed up, since the main title (Case Details) is smaller than the subtitles(Case & Classification). Another problems is that the main title has lift indent (2 pixels I think).
What I want:
1. The main title(Case Details) looks a little bit larger than subtitles.
2. The subtitles should have 2-5 left pixels indent
Thank you.
You could manipulate the fonts via css in custom/themes/custom_less (create the file if you don't have one).
If you use one of the standard css classes that will apply application-wide, but you could create your own css class for the fieldset.
For example, in our application-wide css we suppressed avatars, and made our labels and fonts quite small, we also changed the label background to a gray gradient:
.avatar {
display: none;
}
.record-label {
background-image: linear-gradient(to top, #dfdfdf, #fafafa);
}
h4 {
font-size: 12px;
}
.count {
font-size: 12px;
}
.record{
.normal {
font-size: inherit;
}
}
The result is:
I suppressed the label for the first field because the label for the group is enough for me.
1 =>
array (
'name' => 'phone_work',
'type' => 'fieldset',
'label' => 'LBL_PHONE_WORK',
'fields' =>
array (
0 =>
array (
'name' => 'phone_work',
),
1 =>
array (
'type' => 'label',
'default_value' => 'LBL_WORK_PHONE_EXT_C',
'css_class' => 'record-label',
),
2 =>
array (
'name' => 'work_phone_ext_c',
),
),
Notice the css_class => 'record_label' specified in the work phone extension field's label.
By creating and specifying your own css class you can manipulate the fonts the way you want just for that particular fieldset.
HTH,
FrancescaS
Francesca Shiekh, thank you for your replay,
I will take that in consideration. However, the 'css_class' => 'record-label'
affected all the fields in the same module as well as the fields in other modules (for e.g all fields in Accounts modules had background gray gradient).
I think it will be better if
'css_class' => 'record-label'
affect a particular field.
So we can use that field for main title.
As mentioned, a fieldset is the best way to accomplish what you are requesting. In many cases however, a non-tabbed record panel looks better and is more easily managed in terms of adding/removing fields. Fieldsets makes sense for things like addresses, but unless you want a fieldset for a very specific reason i think panels are the way to go.
Simon Köhlström, thank you for your reply,
As you you said, panels look better and easy to manage, but the thing is that i have too many fields in one module (about 25 - 30 fields). I need to organize them into THREE main groups (so we will have three main titles). One group of the fields which has about 15 fields again need to be organized into three subgroups, so we need to have subtitles for those subgroups, and here i don't think we can use panels again.
Greg Barrass, thank you for your reply.
That is a good idea, but the problem is that i have too many fields in one module (about 25 - 30 fields). I need to organize them into THREE main groups (so we will have three main titles). One group of the fields which has about 15 fields again need to be organized into three subgroups, so we need to have subtitles for those subgroups, and here i don't think we can use panels again.
Thank you
You could try using a field set. In your view
custom/modules/<module>/clients/base/virews/record/record.php
and/or
custom/modules/<module>/clients/base/virews/create/create.php
It will look something like this:
hope this helps,
FrancescaS