From d2a84389a7a1190440ba744237a7a59c29a20f1e Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Tue, 23 Apr 2019 16:45:33 -0400 Subject: [PATCH] fixing the number of golfers dropdown in the golf request form --- footer.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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); } }); -- 2.17.1