From 86cc36f6e4647b76357862a0c920b249aaa0e3e2 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Mon, 6 Jul 2015 20:54:28 -0400 Subject: [PATCH] CRM-16645 - Fix js scope issue affecting popup contribution edit forms --- templates/CRM/Contribute/Form/PCP.js.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/CRM/Contribute/Form/PCP.js.tpl b/templates/CRM/Contribute/Form/PCP.js.tpl index 846cc19f81..11fa37f793 100644 --- a/templates/CRM/Contribute/Form/PCP.js.tpl +++ b/templates/CRM/Contribute/Form/PCP.js.tpl @@ -30,7 +30,7 @@ // FIXME: This could be much simpler as an entityRef field but pcp doesn't have a searchable api :( var pcpURL = CRM.url('civicrm/ajax/rest', 'className=CRM_Contact_Page_AJAX&fnName=getPCPList&json=1&context=contact&reset=1'); - $('#pcp_made_through_id').crmSelect2({ + $('input[name=pcp_made_through_id]', $form).crmSelect2({ minimumInputLength: 1, ajax: { url: pcpURL, -- 2.25.1