3

Here's the use case:

A user submits reports via a webform on a frequent basis. Each time they submit a report the webform creates a new case, and populate a custom activity type with the data that is submitted.

From time to time the administrator may want the user to re-submit a report (they may have made errors or not reached the required standard in the original submission).

What I want to do is enable the administrator to point the user to a webform where they can see all of the data they submitted originally, edit it and upload new versions of required documents, which then updates the data stored in Civi.

Can I get the webform to present the correct submission data to the user, and if so, how?

I can pass in some parameters to the webform via the url (e.g. case client), but as the user is the client of all the cases they submit that's not going to be enough to identify a particular case.

1

You could create a View of Webform Submissions. It's a bit more complicated, but you should be able to achieve it (if I understand you correctly).

Be sure to add the web form submission data (I think that's the one) relationship so you can sort and filter.

Additional thoughts:

I'm trying to get away from views of webform submissions as they are not fun to create/maintain.

Another alternative, and the way I tend to go now, is to create a View of CiviCRM Relationships with the current user in the contextual filter. Include the contact id, case id and activity id fields in the view, but exclude them from the display. Add Case Types and other pertinent info to the view to help distinguish each case and a global text field(s) that links to a new webform.

Create the new webform by cloning the original, on the CiviCRM integration tab change the case section to update existing case and/or activity.

Where your scenario gets tricky for me to understand, is the activity and the case together in one webform. You may need to separate these into two new webforms. One that updates a case and one that updates an activity and create two links in the view one like:
node/new_webform_id?cid1=[id]&aid=[id_1] to update the activity
and one like:
node/new_webform_id?cid1=[id]&caseid=[id_2] to update the case.

0

If the user has permission to edit their webform submissions, then that would be easiest - by editing their existing submission they can make any necessary changes.

One easy way to do this would be to have the webform send out an automatic email using a couple tokens to say e.g.

Thanks for your submission Your submitted values are:

...

If you wish to edit your submission, click here.

  • Thanks for this @coleman. Pointing the user to edit the particular submission may be the simplest option here, but I don't really want to give the user permission to edit their submissions. I'd rather be able to target the correct activity vi a webform. Perhaps if I set a special status for the activity, and use that as an update identifier in the webform, that will be enough? – Graham Sep 25 '15 at 10:23

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.