diff --git a/includes/wf_crm_webform_postprocess.inc b/includes/wf_crm_webform_postprocess.inc index 6ddfe7e53..24ed584ea 100644 --- a/includes/wf_crm_webform_postprocess.inc +++ b/includes/wf_crm_webform_postprocess.inc @@ -1092,6 +1092,8 @@ class wf_crm_webform_postprocess extends wf_crm_webform_base { unset($params['status_id']); } $result = wf_civicrm_api('participant', 'create', $params); + $this->ent['participant'][$n]['id'] = $result['id']; + // Update line-item foreach ($this->line_items as &$item) { if ($item['element'] == "civicrm_{$n}_participant_{$e}_participant_{$id_and_type}") { diff --git a/webform_civicrm.module b/webform_civicrm.module index 5a348a6e7..4442ce746 100644 --- a/webform_civicrm.module +++ b/webform_civicrm.module @@ -364,6 +364,13 @@ function webform_civicrm_webform_submission_actions($node, $submission) { 'query' => array('action' => 'view', 'reset' => 1, 'cid' => $data['contact'][1]['id'], 'id' => $data['contribution'][1]['id']), ); } + if (!empty($data['participant'][1]['id'])) { + $actions['civicrm_action participant_view'] = array( + 'title' => t('View Participant'), + 'href' => 'civicrm/contact/view/participant', + 'query' => array('action' => 'view', 'reset' => 1, 'cid' => $data['contact'][1]['id'], 'id' => $data['participant'][1]['id']), + ); + } } } return $actions;