From: Anthony Talarico Date: Tue, 23 Apr 2019 20:45:33 +0000 (-0400) Subject: fixing the number of golfers dropdown in the golf request form X-Git-Tag: v1.0.0^2~5 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=d2a84389a7a1190440ba744237a7a59c29a20f1e;p=WP-Themes%2Fmeetmtp.git fixing the number of golfers dropdown in the golf request form --- diff --git a/footer.php b/footer.php index 0f51a96..7ffa238 100644 --- a/footer.php +++ b/footer.php @@ -98,8 +98,8 @@ if ( ! defined( 'ABSPATH' ) ) { $("#field_8_56").find(".delete_list_item").attr("id", "removeRowBtn"); $("#field_8_57").find(".delete_list_item").attr("id", "removeRowBtn2"); - $('.gfield_list_56_cell2').find("[name='input_56[]']").attr("id", 'cell2A'); - $('.gfield_list_57_cell2').find("[name='input_57[]']").attr("id", 'cell2B'); + $('.gfield_list_56_cell2').find("[name='input_56[]']").addClass('cell2A'); + $('.gfield_list_57_cell2').find("[name='input_57[]']").addClass('cell2B'); $('.gfield_list_56_cell3').find("[name='input_56[]']").attr("id", 'cell3A'); $('.gfield_list_57_cell3').find("[name='input_57[]']").attr("id", 'cell3B'); $('.gfield_list_56_cell4').find("[name='input_56[]']").attr("id", 'cell4A'); @@ -111,13 +111,14 @@ if ( ! defined( 'ABSPATH' ) ) { $('#input_8_1').blur(function () { input = $('#input_8_1').val(); //alert(input); - for (i = 0; i <= input; i++) { + for (var i = 1; i <= input; i++) { + console.log( i) el = document.createElement("option"); el.value = i; el.text = String(i); - $("#cell2A").append(el); - - document.getElementById('cell2B').appendChild(el); + $(".cell2A").append( $(el) ); + $(".cell2B").append( $(el) ); + // document.getElementById('cell2B').appendChild(el); } });