diff --git a/CRM/Admin/Form/ScheduleReminders.php b/CRM/Admin/Form/ScheduleReminders.php index 21f82dc32150..21535cd02d91 100644 --- a/CRM/Admin/Form/ScheduleReminders.php +++ b/CRM/Admin/Form/ScheduleReminders.php @@ -88,6 +88,7 @@ public function buildQuickForm() { ))); if ($mapping) { $this->_mappingID = $mapping->getId(); + $this->add('hidden', 'mappingID', $this->_mappingID); } else { CRM_Core_Error::fatal('Could not find mapping for event scheduled reminders.'); diff --git a/templates/CRM/Admin/Form/ScheduleReminders.tpl b/templates/CRM/Admin/Form/ScheduleReminders.tpl index 0ebb82761d3a..259148dafb24 100644 --- a/templates/CRM/Admin/Form/ScheduleReminders.tpl +++ b/templates/CRM/Admin/Form/ScheduleReminders.tpl @@ -194,7 +194,7 @@ $('#mode', $form).change(loadMsgBox); function populateRecipient() { - var mappingID = $('#entity_0', $form).val(); + var mappingID = $('#entity_0', $form).val() || $('[name^=mappingID]', $form).val(); var recipient = $("#recipient", $form).val(); $("#recipientList", $form).hide(); if ($('#limit_to').val() != '' ) {