diff --git a/booking.js b/booking.js index e436e66..bcb1552 100644 --- a/booking.js +++ b/booking.js @@ -5,6 +5,9 @@ Drupal.ajax.prototype.commands.bookingEmailIDs = function(ajax, response, statu jQuery(function($) { var arr = $.parseJSON($('input#booking_email_default_ids').val()) - alert(arr.first()); // this will be executed after the ajax call + $('#booking-manual-email-form').find(':checkbox[name^="table"]').each(function () { + $(this).prop("checked", ($.inArray($(this).val(), arr) != -1)); + }); + alert(arr[0]); }); } \ No newline at end of file