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 Profiles (Moderator: Dave Greenberg) »
  • Grabbing a webform value for prepopulating a field on a Civi profile
Pages: [1]

Author Topic: Grabbing a webform value for prepopulating a field on a Civi profile  (Read 1622 times)

Shai

  • I post frequently
  • ***
  • Posts: 202
  • Karma: 8
    • Content2zero
  • CiviCRM version: 4.3.x, 4.4.x, 4.5.x
  • CMS version: Drupal 7
  • MySQL version: 5.5.x
  • PHP version: 5.3.x, 5.4.x
Grabbing a webform value for prepopulating a field on a Civi profile
March 11, 2010, 04:25:34 pm
I've got a Drupal (6.16) and Civi (3.0.x) install for a client. I'm using the <a href="http://drupal.org/project/webform">Webform</a> for a really basic email grab, "Sign up for our newsletter" form. On the thank you page, we'll be inviting folks who want to to fill out a Civi profile.

How can I grab the email address from the webform form and pre-populate the email field on the Civi profile with that address, so those choosing to fill in the profile don't have to type their email address twice?

Note: there is no integration between Drupal users and Civi contacts. The org is only using Drupal users for staff people.

Ideas?

Thanks,

Shai Gluskin
Don't miss out! Sign up now for free expert advice on CiviCRM's new StackExchange help site.

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Grabbing a webform value for prepopulating a field on a Civi profile
March 15, 2010, 10:53:20 am
As per my understanding when you submit a form created by webform you want to redirect user to civicrm profile and pre-populate email address - profile field.

So in this case when you redirecting to civicrm profile, I would append email address in the profile url. For eg:

http://<site_name>/profile/create?gid=1&reset=1&email=hello@example.org

Then use builForm hook in civicrm to retrive email from above url and use it to set default.

Hth

Kurund
Found this reply helpful? Support CiviCRM

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Grabbing a webform value for prepopulating a field on a Civi profile
March 17, 2011, 01:04:49 pm
You can install the Webform CiviCRM Integration module to take care of this task, with no redirects or profiles necessary.
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 Profiles (Moderator: Dave Greenberg) »
  • Grabbing a webform value for prepopulating a field on a Civi profile

This forum was archived on 2017-11-26.