Answers.Body: <p>As already pointed out, the created date is shown on the summary anyway - but since your question is more about using <code>hook_civicrm_summary()</code>, here's an simple example to add the date above the existing summary content:</p>
  
  <pre><code>function demo_civicrm_summary($contactID, &amp;$content, &amp;$contentPlacement) {
    // Lookup 'created_date' for the specified contact
    $dateCreated = civicrm_api3('Contact', 'getValue', array(
      'id' =&gt; $contactID, 
      'return' =&gt; 'created_date',
    ));  
  
    // Set $content to what we want to display
    // Can add html with classes for formatting ...
    $content = 'Date created: ' . $dateCreated;
  
    // Set $contentPlacement to specify where our content is displayed.
    // The default if we don't set this is to display below the existing summary
    $contentPlacement = CRM_Utils_Hook::SUMMARY_ABOVE;
  }
  </code></pre>
  
  <p><a href="https://i.sstatic.net/tCkGq.png" rel="noreferrer"><img src="https://i.sstatic.net/tCkGq.png" alt="enter image description here"></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-08T07:06:48.740Z
Answers.LastActivityDate: 2018-06-08T07:06:48.740Z
Answers.UserDisplayName: Aidan
Answers.Body: <p>The contact created date does show up on Contact Summary page at the bottom of the summary page 
  <a href="https://i.sstatic.net/Nc4oc.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Nc4oc.png" alt="enter image description here"></a></p>
  
  <p>If you want as a field to show in summary section then i feel you can use civicrm_summary hook but it would to be very difficult to manipulate where to insert a section in $content as it would be pure html. I would use Buildform and/or Page run hook to add field with some JS to place the field in the page/form.</p>
  
  <p>HTH</p>
  
  <p>Pradeep</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-07T21:20:38.570Z
Answers.Text: I expect you know the data is in civicrm_contact.created_date field but since no one has mentioned that i thought i should state the obvious
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-07T11:27:29.370Z
Answers.LastActivityDate: 2018-06-07T11:27:29.370Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>I am trying to add contact created date in contact summary. I am sure that <a href="https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_summary/" rel="nofollow noreferrer">https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_summary/</a> helps the requirement. But I'm not getting how to implement this hook.Any help please?</p>
  
Tags: <contacts><hooks>
Title: Contact Summary Hook Implementation
ThreadText: # Contact Summary Hook Implementation
  
  (Asked by: username_0 on 2018-06-07)
  
  I am trying to add contact created date in contact summary. I am sure that <https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_summary/> helps the requirement. But I'm not getting how to implement this hook.Any help please?
  
  **Tags:** contacts, hooks
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-06-08. Score: 5
  
  As already pointed out, the created date is shown on the summary anyway - but since your question is more about using hook_civicrm_summary(), here's an simple example to add the date above the existing summary content:
  function demo_civicrm_summary($contactID, &$content, &$contentPlacement) {
    // Lookup 'created_date' for the specified contact
    $dateCreated = civicrm_api3('Contact', 'getValue', array(
      'id' => $contactID, 
      'return' => 'created_date',
    ));  
  
    // Set $content to what we want to display
    // Can add html with classes for formatting ...
    $content = 'Date created: ' . $dateCreated;
  
    // Set $contentPlacement to specify where our content is displayed.
    // The default if we don't set this is to display below the existing summary
    $contentPlacement = CRM_Utils_Hook::SUMMARY_ABOVE;
  }
  
  
  ---
  
  ### Answer by username_2 on 2018-06-07. Score: 1
  
  The contact created date does show up on Contact Summary page at the bottom of the summary page
  [![enter image description here](https://i.sstatic.net/Nc4oc.png)](https://i.sstatic.net/Nc4oc.png)
  
  If you want as a field to show in summary section then i feel you can use civicrm\_summary hook but it would to be very difficult to manipulate where to insert a section in $content as it would be pure html. I would use Buildform and/or Page run hook to add field with some JS to place the field in the page/form.
  
  HTH
  
  Pradeep
  
  > **Comments:**
  > **username_3**: I expect you know the data is in civicrm_contact.created_date field but since no one has mentioned that i thought i should state the obvious  
  
  ---
  
  