CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions (Moderator: Dave Greenberg) »
  • Is it possible to replicate or clone the Address fieldset of Contacts?
Pages: [1]

Author Topic: Is it possible to replicate or clone the Address fieldset of Contacts?  (Read 1165 times)

NacahKalah

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4
  • CMS version: Drupal 6
  • MySQL version: 5
  • PHP version: 5
Is it possible to replicate or clone the Address fieldset of Contacts?
August 11, 2011, 05:05:40 pm
I like the ability to insert multiple addresses and would like to insert multiple sub records for a Contact 'inline' instead of in a tab.

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Is it possible to replicate or clone the Address fieldset of Contacts?
August 11, 2011, 05:47:47 pm
There is already the ability to have multiple address locations eg work/home etc in the Edit summary screen. Can you clarify what you are needing that is not covered by that?
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

NacahKalah

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4
  • CMS version: Drupal 6
  • MySQL version: 5
  • PHP version: 5
Re: Is it possible to replicate or clone the Address fieldset of Contacts?
September 14, 2011, 02:35:50 pm
I like the current ability to insert multiple 'addresses.'
I would like to replicate the portion of code that makes that possible and use it to add 'relatives.'

I know i can add and 'relate' individuals within the db but don't want to waste an entire record for a few fields of data.

Also, I would like it to be 'inline' like addresses are.

Thank you for your response. Just saw it.

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Is it possible to replicate or clone the Address fieldset of Contacts?
September 14, 2011, 02:49:21 pm
Still not clear what you are after
Quote from: NacahKalah on September 14, 2011, 02:35:50 pm
I know i can add and 'relate' individuals within the db but don't want to waste an entire record for a few fields of data.
You can do this on the Relationships Tab - and others have altered the summary tpl to then have certain relationships display on the Summary screen

So with in civicrm_custom (or whatever you call your custom tpl directory) /templates/CRM/Contact/Page/View/Summary.tpl i think it requires (example for Relationship Type = 10)

Code: [Select]
{crmAPI entity="relationship" action="get" var="relationships" contact_id=$contactId relationship_type_id=1}
{if $relationships.values}
 <div class="contact_panel">
<div class="contactCardRight">
 <table>
{foreach from=$relationships.values item=rel}
{if $rel.relationship_type_id eq 10}
<tr id="rel_{$rel.cid}">
{if $rel.is_active == 0 }
   <td class="label">former</td>
{else}
<td class="label">{$rel.relation}</td>
{/if}
<td class="name"><a href="/civicrm/contact/view?cid={$rel.cid}&reset=1">{$rel.name}</a></td>
</tr>
{/if}
{/foreach}
</table>
</div>
</div>
{/if}

around line 245
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

NacahKalah

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4
  • CMS version: Drupal 6
  • MySQL version: 5
  • PHP version: 5
Re: Is it possible to replicate or clone the Address fieldset of Contacts?
September 14, 2011, 03:00:18 pm
Pete! Thanks for the prompt reply. Will test this code soon but wanted to say, 'Thank You!'

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions (Moderator: Dave Greenberg) »
  • Is it possible to replicate or clone the Address fieldset of Contacts?

This forum was archived on 2017-11-26.