1

I am trying to create a profile to display contacts who are in a specific group as an HTML listing which can then be output as a print directory.

The first field should be the contact image (although not all entries will have images). The only field I can find which seems relevant is Image-Url (Contact) - but that merely displays the URL as text. I tried adding formatting fields (Free HTML) before and after to wrap the output with , but that has made no difference.

I am linking to my output (it's on an intranet) as /drupal/?q=civicrm/profile?reset=1&gid=21&force=1&search=0

Most of the documentation on Profiles seems to be oriented to their use as forms, not as display formatting.

2

If you are indeed using Drupal, a better option for displaying this information might be Drupal Views, which you can use to format and display most of the fields I suspect you would need for this kind of directory. (You could even use Views PDF to output it as a PDF document, if you really want to take control of formatting, text/image placement, and printability.) I'm not sure that profiles will get you where you need to go for displaying/outputting information.

Hope this helps, Lesley

  • After much trying, I discovered that the formatting capabilities of views (plus extra modules) are useless with data from CiviCRM, because the data is populated via a JSON request to civicrm, which completely bypasses the views formatter. It would appear that the solution lies within CiviCRM, probably via a custom report template. – Richard Grevers May 31 '16 at 1:21
1

I use the "Image URL" field on a profile on one of the sites I work on (although I change the label to simply "Image") and it shows up as an image with options to delete and reupload:

Image field in profile

EDIT: I think I see what you are referring to -- not viewing a contact that already has an image, but uploading a new image. The image doesn't preview before saving, although it does show if you reload the contact in the profile after saving. So if that is the problem, I don't think I can help you! But if the point is just to get the image in there for future reference, it should be there (and display correctly) if you save the contact through this profile, and then view the contact again in the profile.

Preparing to upload (before saving):

Upload image

After hitting save and loading the contact back into the profile:

Upload image 2

  • No, I'm using the force=1 parameter to completely disable the form aspects of the profile. I want output only. Alas, most of the documentation on profiles is about their use in forms rather than for display. – Richard Grevers Aug 26 '15 at 23:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.