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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Obtaining contact id's in the Smarty Delete Contact template
Pages: [1]

Author Topic: Obtaining contact id's in the Smarty Delete Contact template  (Read 1890 times)

dougall

  • Guest
Obtaining contact id's in the Smarty Delete Contact template
July 14, 2008, 04:41:22 am
Hi,

Is it possible to obtain the contact ids of the contacts which are to be deleted from the inside the Delete Contact smarty template (/CRM/Contact/Form/Task/Delete.tpl) ?

What I'm trying to do is run an sql query for each contact who is being deleted, and depending upon the results of these queries add an additional warning.

Thanks,
  Dougall

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Obtaining contact id's in the Smarty Delete Contact template
July 14, 2008, 10:18:13 am
That info is available in the shared preProcess() function for tasks - $this->_contactIds (CRM/Contact/Form/Task.php).
Protect your investment in CiviCRM by  becoming a Member!

dougall

  • Guest
Re: Obtaining contact id's in the Smarty Delete Contact template
July 16, 2008, 04:37:24 am
Hi Dave,

That's great for when deleting multiple contacts (i.e. via the contact search results page), but this preProcess() isn't called when deleting a single contact via the contact's view summary delete button.

After a little searching I discovered that in this case the relevant preProcess() function is the one in /CRM/Contact/Form/Task/Delete.php.

Thanks for pointing me in the right direction once again.
  Dougall

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Obtaining contact id's in the Smarty Delete Contact template

This forum was archived on 2017-11-26.