4

I’m using Drupal 7.39, CiviCRM 4.6.7, and Webform CiviCRM Integration 7.x-4.12. I have a webform built whereas I’ve enabled the ‘Existing Contact’ field as I want the fields in the form to be filled out if the user has a CiviCRM contact record and those data are already entered.

If the user already has a Drupal account and a corresponding CiviCRM contact then all works well. The user logs and and goes to the form, sees the existing information, changes what needs editing, submits, and the corresponding CiviCRM contact record is updated with the new information.

The issue seems to be if there is a CiviCRM contact record and no associated Drupal account. If a user creates a new Drupal account then goes to the webform and submits it, a duplicate CiviCRM contact is created, the dedup rules are not used.

I noticed that when choosing a ‘Matching Rule’ there is this information:

Note: Matching rules are only used if the contact is not already selected via "Existing Contact" field.

Is there a way around this? I need to have the form autopopulate if the Drupal user already has a CiviCRM contact record so they know what their existing information is and what might need to be corrected. But at the same time if they are creating a new Drupal account I want to avoid getting a lot of duplicate CiviCRM contacts created.

  • If they create a Drupal account is there already a duplicate before they fill the Webform? If so, you may be able to use a Profile on the Drupal account creation page that matches contacts to prevent duplicates there -- at which point the webform should function as expected. – Laryn - CEDC.org Aug 25 '15 at 18:52
  • @Laryn I think this is the correct answer. Deduping should be performed on account creation. – Coleman Aug 25 '15 at 18:54
3

If they create a Drupal account is there already a duplicate before they fill the Webform? If so, you may be able to use a Profile on the Drupal account creation page that matches contacts to prevent duplicates there -- at which point the webform should function as expected.

2

The way we do it is that we have 2 webforms.

The first form creates a civi-drupal linked user account. On this form we deactivate the existing user feature. We use the civicrm_rules integration module and set a rule to create a drupal user for civicrm contacts who have a certain tag. See here and we use the CiviGroup Roles Sync module to assign Drupal permissions.

The second form includes the existing user but we set it to static and display name = yes. in form settings we set it to only allow authenticated users.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.