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) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • CiviCRM + Webform
Pages: [1]

Author Topic: CiviCRM + Webform  (Read 1132 times)

micrypt

  • Guest
CiviCRM + Webform
October 11, 2010, 05:12:24 pm
Hi,

Earlier today, I had some trouble digging up information on piping data from Webforms to CiviCRM. I ended up going with this. Added the following to the post-processing field for the webform:

http://pastie.org/1214275

I hope someone else finds it handy.

Regards,

@micrypt

Rajan Mayekar

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 20
    • Rajan's Blogs
Re: CiviCRM + Webform
October 11, 2010, 10:05:50 pm
Hi micrypt,

Thats looks great. But I would like to suggest best way to using civicrm apis.

Instead of the following
Code: [Select]
$civicrm_root = '/path/to/drupal/sites/all/modules/civicrm';
require_once $civicrm_root . '/civicrm.config.php';
require_once $civicrm_root . '/api/v2/Contact.php';
require_once $civicrm_root . '/api/v2/GroupContact.php';

you may use
Code: [Select]
// initialise civicrm
if ( ! civicrm_initialize( ) ) {
        return;
}
require_once 'api/v2/Contact.php';
require_once 'api/v2/GroupContact.php';

Which is more dynamic and recommended by CiviCRM.

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: CiviCRM + Webform
April 10, 2011, 11:00:51 am
Consider using the new webform civicrm integration module for an easier and more comprehensive solution.
Try asking your question on the new CiviCRM help site.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • CiviCRM + Webform

This forum was archived on 2017-11-26.