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) »
  • How do I add a checkbox to the New Individual form...?
Pages: [1]

Author Topic: How do I add a checkbox to the New Individual form...?  (Read 1805 times)

Caffeine Addict

  • Guest
How do I add a checkbox to the New Individual form...?
November 20, 2008, 06:10:25 am
I've been asked to add a checkbox to the admin's New Individual form so that (when the checkbox is checked) the new user receives an email telling them how wonderful we are.

I think I've worked out how to hook in the sending part
Code: [Select]
function CA_civicrm_post( $op, $objectName, $objectId, $objectRef ) {
  if ($objectName=="Individual") {
    if ($op=="edit") {
      require_once dirname(__FILE__)."/module/updateindividual.php";
      contactIndividualUpdated($objectRef);
    }
    else {
      error_log('send email code here...');
    }
  }
// etc, etc...

The problem is adding the checkbox. I'd hoped to get helpful feedback when I added this code, but got nothing at all, so I'm obviously looking in the wrong place...
Code: [Select]
function CA_civicrm_buildForm( $formName, $form )
{
error_log($formName.' :: '.$form);
}

So, guys, any suggestions on where I should be looking to add this checkbox? What incredibly obvious thing am I missing?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: How do I add a checkbox to the New Individual form...?
November 20, 2008, 11:24:58 am

The buildForm hook is available in the 2.1 release only. You'll need to upgrade to get that feature along with a few other hooks

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Caffeine Addict

  • Guest
Re: How do I add a checkbox to the New Individual form...?
November 21, 2008, 01:39:50 am
And that's the only way to push some extra data onto that form I take it? Damn. Okay... looks like it's upgrade time...

Cheers.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • How do I add a checkbox to the New Individual form...?

This forum was archived on 2017-11-26.