dev/core/issues/322 - fix JS error on contribution page, completing form on behalf...
authorDave Jenkins <davej+git@circle-interactive.co.uk>
Mon, 13 Aug 2018 17:10:17 +0000 (18:10 +0100)
committerDave Jenkins <davej+git@circle-interactive.co.uk>
Mon, 13 Aug 2018 17:10:17 +0000 (18:10 +0100)
js/AlternateContactSelector.js

index 6098b242910ceacc705e1bf2320abeb1a7f1edbc..bb73d17e0dc2e8a0f02afaaf6e0ac88a225b842e 100644 (file)
@@ -9,7 +9,7 @@ CRM.$(function($) {
           $.each(result.values, function (id, value) {
             $.each(value, function (fieldname, fieldvalue) {
               $('#' + fieldname).val(fieldvalue).change();
-              $("[name=" + fieldname + "]").val([fieldvalue]);
+              $('[name="' + fieldname + '"]').val([fieldvalue]);
               if ($.isArray(fieldvalue)) {
                 $.each(fieldvalue, function (index, val) {
                   $("#" + fieldname + "_" + val).prop('checked', true);