1

I'm using Drupal 7, Webform 3.19 and CiviCRM 4.3.

I am using webforms to update CiviCRM information. What I'm trying to do know is to send an email after a webform has been submitted with the values after submit and values before submit, to notify the change done.

Is this possible? I've also been looking at Rules and I have found nothing...

Thx

1 Answer 1

3

The short answer is that you'll need to write a custom Drupal module or CiviCRM extension.

It would use hook_civicrm_pre and would have to distinguish between updates coming from your webform and updates coming from normal backend work. There may be some other hook for Webform that is called pre-saving that you could use for that. (hook_form_alter would allow you to add something to process pre-saving, but there's no sure way to know that you're getting the same contact ID as Webform does). Regardless, your module/extension would need to retrieve the relevant fields from the existing content and email it to you along with the form values.

You could alternatively enable CiviCRM's logging feature, but this will often cause problems with database bloat and upgrade headaches. (Which is why it's labeled as a beta feature years after it was introduced.)

A final option could be to only send this when there are defaults provided (i.e. only if someone is logged-in or using the checksum). There, you'd still need to write a custom module, but it could be more reliable in pulling the right contact's information.

Sign up to request clarification or add additional context in comments.

1 Comment

Lucia, I'm wondering if you would be willing to help create a StackExhange site specifically for CiviCRM? We're almost there, and just need a few more people like you with over 200 reputation on another SE site to 'commit' to the proposal - area51.stackexchange.com/proposals/77367/civicrm Thx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.