What would be the best way to display custom contact fields in the contact dashboard (civicrm/user).

We're using custom fields to store waiver/agreement statuses and would like users to be able to get a quick view of all waivers from the dashboard.

  • what CMS are you using? would a solution (ie a profile) that showed on their login page, rather than their civi contact dashboard be acceptable?
    – petednz - fuzion
    Sep 3 '19 at 19:28
  • We're using Drupal 7. I would like for it to be a part of the dashboard but I can give it a try with a separate view.
    – Chankster
    Sep 4 '19 at 13:41
  • Then pls consider my answer below
    – petednz - fuzion
    Sep 4 '19 at 19:05

If you are using Drupal, one option is to create a View as a Block and then set the Block to show at the Contact Dashboard page.

WP may have a similar solution based on using a CiviCRM Profile and having that set up (via some WP approach I do not know) to show at the Contact Dashboard path


You can put a file called UserDashBoard.extra.tpl in your extension in the templates/CRM/Contact/Page/View folder, and then put your html in it and use smarty's crmAPI to retrieve the data based on the value of $contactId which will contain the user contact id.

  • 1
    This is pretty useful and may solve my issue. Is there a way to keep everything styled the same as it seems to put the extra stuff outside the crm-main-content-wrapper block?
    – Chankster
    Sep 4 '19 at 17:42
  • 1
    It would be a bit hokey but you could use some jquery in the tpl to manipulate the DOM and move it. See api.jquery.com/insertafter where it says "We can also select an element on the page and insert it after another".
    – Demerit
    Sep 4 '19 at 17:45
  • If Demerit's jQuery suggestion in hokey, then most Civi developers are hokey. That's a pretty standard technique these days for injecting content in place. Tim Otten's work on afform will hopefully render this technique obsolete, but that's a ways off yet. Sep 4 '19 at 22:30
  • He he - I won't confirm or deny if I've used it myself several times...
    – Demerit
    Sep 4 '19 at 22:42
  • I followed Demerit's answer and successfully setup custom fields to display on the Donor Database. I even used the second part to move it to the top of the dashboard
    – Iowa Boy
    Mar 17 at 21:12

Might be too late to help you but this may be the answer you're looking for: https://civicrm.org/extensions/contact-layout-editor

That extension lets you entirely customize the display on the "summary" tab for contacts. Beyond the options that it offers, if you can't get it to display exactly what you want in your case you can also code your own custom blocks to add to the layout.

EDIT: Sorry, I see that you're interested in a different page /civicrm/user. My answer would apply for anyone who wants to edit /civicrm/contact/view.

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.