CRM-15181, adv select fixes, for onbehalf profile
[civicrm-core.git] / templates / CRM / Contribute / Form / SoftCredit.tpl
index 2fe9ff9abed8fd777318a58a60f1b5ea504795e3..71dc72fdeafcaa653d4f221394f14c4047de43be 100644 (file)
@@ -67,7 +67,7 @@
 {literal}
 <script type="text/javascript">
   CRM.$(function($) {
-    var $form = $("#{/literal}{$form.formName}{literal}");
+    var $form = $("form.{/literal}{$form.formClass}{literal}");
     $('#showPCP, #showSoftCredit').click(function(){
       return showHideSoftCreditAndPCP();
     });
     })
       // This is just a cheap trick to store the name in case of a formrule error
       .on('change', function() {
-        //$('[name=pcp_made_through]', $form).val($(this).select2('data').text || '');
+        $('[name=pcp_made_through]', $form).val($(this).select2('data').text || '');
       });
 
     $('.crm-soft-credit-block tr span').each(function () {