Dear community,
Is there a way to show images (portraits) of contacts in SuiteCRM?
Thanks in advance
Best Regards
H
Dear community,
Is there a way to show images (portraits) of contacts in SuiteCRM?
Thanks in advance
Best Regards
H
Hi there,
If you are the Administrator of the system navigate to Admin > Studio.
When the Studio page loads navigate to the Contacts module within the Module tree and expand the tree to show Labels, Fields, Relationships, Layouts and Subpanels. Expand further the âLayoutsâ folder and click on the EditView.
This will load the current fields that are available to users when they Edit the record. Within the toolbox area there should be a âPhotoâ field available as default.
To make this field display on your EditView layout, first you must find space for it if there is not one already available. If there are no empty spaces on the layout already i.e. a box that says â(filler)â then drag and drop a ânew panelâ onto the layout. It should gird lock into place on your layout. Once you have a panel (which then provides you with two â(filler)â spaces) you can then drag and drop the Photo field into one of those spaces.
If you had a space already available then simply drag and drop the Photo field into that box.
Once you are happy with the layout click âSave & Deployâ
Then test your new layout by navigating to a Contact record in EditView, and there you will have a âbrowseâ image field named as âPhotoâ.
To show the uploaded image on the DetailView, repeat the above steps but instead of the EditView you will navigate to the Detail View and add the âPhotoâ field to that layout. Remember to Save & Deploy when happy.
Hope this helps.
Thanks! This was great! Immediate, easy to follow and working
How can I adjust the image size on the contact page? Currently it is about 30px in height. Only âSave asâ gives me the real size of the image. A reasonably identifyable size would be great.
Thanks again in advance
Best Regards
H
No problem.
This part you will need to have access to the files for this alteration.
First, set the width and height of the image field via the Studio section (again navigate to Admin > Studio > Contacts (Module)). This time click on the âFieldâ link within the Contacts moduleâs tree. This will list all the currently available fields for that module. Click again on âPhotoâ and it will display attributes of that field e.g. Datatype, Border, Height, Width etc.
The default is 160 x 160 pixels⌠However, the template is not showing as expected (It displays the image on the DetailView very small). This is because the template of the Contactâs DetailView has restricted the image (Weâve raised a bug for this)
If you have access to the system files look for a file called âDetailView.tplâ within your SuiteCRM folder include/SugarFields/Fields/Image
Replace:
height="50"
With:
height="{if !$vardef.height}{{$vardef.height}}{else}50{/if}"
After this, save that file (re-upload if required) and do a Quick Repair & Rebuild of the CRM to overwrite the old DetailView template (Navigate to Admin > Repair > Quick Repair & Rebuild).
Once the Quick Repair & Rebuild has been successful navigate back to your Contactâs DetailView that has a photo and it should be larger!
Hope this helps.
Thanks again.
This one seems to be a bit more tricky.
I followed your advice until âClick again on âPhotoââ which created the followin error message popup:
undefined
Warning: Creating default object from empty value in /www/htdocs/user/domain/modules/ModuleBuilder/views/view.modulefield.php on line 154
{âeastâ:{âtitleâ:âEdit Fieldâ,âcrumbâ:"",âcontentâ:"
</div>\n\n
The âundefinedâ label is already subject to a different thread: https://suitecrm.com/forum/suitecrm-7-0-discussion/7070-undefined-labels-all-over-the-place#25527
Maybe the content is also due to access rights issues?
Thanks in advance
Best Regards
H
Try creating a new field of the type âImageâ in your module via Studio. Can you set the image height/width there?
See if the issue is with that particular âPhotoâ field.
P.S. You may not need to adjust the height/width through Studio if you donât require it. The Default height and width are 160px. You could skip that step and just adjust the template and Repair & Rebuild.
Clicking âAdd fieldâ in Studio in the Contacts module leads to the same error message:
undfined
Warning: Creating default object from empty value in /www/htdocs/w011f7da/crm.tomspike.com/modules/ModuleBuilder/views/view.modulefield.php on line 154
{âeastâ:{âtitleâ:âEdit Fieldâ,âcrumbâ:"",âcontentâ:"
</div>\n\n
Thanks in advance
Best Regards
H
Hi,
I managed to fix the âundefinedâ labels.
The error message remains when I try to display attributes of the âphotoâ or any other field. Als trying to add a new field brings up the following error message:
An error has occured
Warning: Creating default object from empty value in /www/htdocs/user/domain/modules/ModuleBuilder/views/view.modulefield.php on line 154
{âeastâ:{âtitleâ:âEdit Fieldâ,âcrumbâ:"",âcontentâ:"
</div>\n\n
Thanks in advance
Best Regards
H
The information in this topic is very helpful, thanks!
I got the pictures to work in edit view and detail view.
Now Iâm trying to add them to a subpanel list, but I canât see the âphotoâ field in Studio when editing the subpanels⌠is there a way to get the photos (as small thumbnails) on those subpanels?
Thanks in advance!
PGR, were you able to add the photos to the subpanel? Iâd like to know how. Thanks!
Hi
youâll find everything you need to know here:
https://github.com/salesagility/SuiteCRM/issues/1305
By the way, that issue is already fixed in a Pull Request, but unfortunately it hasnât been merged yet. It will come out in a future version at some point, I hopeâŚ
Hi,
I just installe SuiteCRM 7.11 on Ubuntu 18.04. Searching for instructions on how to add a picture to the contact, i found your most helpful description. I found the empty field to the right of the description field in the contacts layout and added the photo element there. Then in Editor mode I could add an image to a contact.
When switching to display mode, however, there is no image displayed. What went wrong?
I checked the html source code for both modes. In display mode, the field for displaying the photo is completely empty. Did I forgot something?
The source code for both modes:
I would appreciate any help, many thanks in advance
GĂźnter
Problem solved!
I did not notice that two layouts had to be changed. After I changed the layout for the detail view, everything is fine.
Regards
GĂźnter