How can I define the activity and/or case in a CiviCRM-integrated webform? I have a Drupal webform that is integrated to my CiviCRM installation and uses numerous custom fields that are associated with a particular activity type. I want to use the form to allow specific contacts to edit an activity that is part of a pre-existing case.

The contact who will be submitting the webform (contact 1) has an assigned role in the case and a relationship to the case manager. We're using Views to show some data to this contact including a link to the webform. I understand that I can pass a case ID and/or an activity ID into the form via the URL that is presented to the contact in the View, and I can see how I can do this by rewriting the output of one of the Views fields.

The question is: do I need to pass in both the case ID and the activity ID, or is it enough just to pass in the activity ID?

And what should I have as the settings for the case and activity in the CiviCRM tab for the webform?
Case and activity settings are a bit tangled up with each other in the current (v4.9) version of the module...

BUT, I've just committed several changes to 4.x-dev (soon to be released as v4.10) which:


Support multiple activities and multiple cases on a webform
Detach the activity and case tabs from each other so you can more cleanly work with one or the other
Allow you to file an activity on a case without having to go through the entire case configuration on the webform


When I get this into working shape (probably next week) I would love your help testing it out.

And to answer your question, if you are updating an existing activity it should be sufficient to pass the activity id. In the current version this will only work if contact 1 is the creator or target or assignee of the activity. I may be able to make this more flexible in the next version.