4

I've got a webform that creates a Case and two Contact Records (one of whom is logged in as authenticated user). I want to allow the user the ability to edit the webform.

I've tried two options:

  1. Encouraging them to use this page: mysite.org/node/1/submissions

However, any changes they make are only saved in the webform, and CiviCRM Case info is not updated.

  1. Providing a link < a href="https://mysite.org/amend-individual-grant-application/?cid=[contact_id_b_]&caseid=[id]">View submission

This is slightly odd - it prefills the information, but conditions don't appear to work (e.g. fields are hidden when they should be shown) and I have the same problem as option 1.

I wondered if it's a permissions issue - I gave permission to edit all contacts (since there is more than one contact involved) but there's no equivalent for Cases (only 'access my cases/all cases', which is not quite the same thing).

Any ideas why the information is not saving in CiviCRM?

2
  • Just checked the error logs: The CiviCRM "case create" API returned the error: "Case is linked with more than one contact id. Provide the required params orig_contact_id to be replaced" when called by function "postSave" on line 218 of wf_crm_webform_postprocess.inc with parameters: "Array ( [client_id] => Array ( [0] => 103 [1] => 102 ) [role_15] => Array ( [0] => 102 ) [role_19] => Array ( ) [role_9] => Array ( ) [status_id] => 4 [medium_id] => 3 [id] => 52 [check_permissions] => [version] => 3 ) " Apr 7, 2020 at 12:18
  • I don't want to add a case, I want to update the case - on the webform, under the CiviCRM/Case options, I have set the status that would allow a Case to be updated Apr 7, 2020 at 12:20

2 Answers 2

2

Basically, the webform was unable to update a submission with more than one client. I've had to rethink a couple of things and rely on relationships for the second 'client' so that there is a single Client per Case.

1

Editing webform submissions don't go through to CiviCRM. This just changes the form submission result.

And the URL link is more like https://www.example.org.uk/formurl?cid1=11446&case1=2055. Where CID can be CID1 or CID2 etc depending on which contact(s) you want to pre load into the form. And in the form don't have Update Existing Case set if you are specifying the Case ID in the URL.

Olly

1
  • Thanks for the help, I mostly got there in the end. I've had to rethink the Cases so that there is only one Client - that was the main issue. The only (minor) issue is that fields with conditions applied (e.g. if field 1 = yes, then show field 2) don't work, so the user has to fill these in again. It's only about 4 check boxes, so either I live with it, or I create a copy of the webform for editing with no conditions applied. Apr 24, 2020 at 17:57

Your Answer

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

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