From 9cd86fe76f5a8092e511174b97eb075ee39c372e Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Thu, 24 Sep 2015 15:53:12 -0400 Subject: [PATCH] Edited gravity_forms_golf_package.js and gravityForms.scss to update the form id after importing new form into admin page --- js/custom/gravity_forms_golf_package.js | 16 ++++++++-------- scss/plugins/_gravityforms.scss | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/js/custom/gravity_forms_golf_package.js b/js/custom/gravity_forms_golf_package.js index ab2f08d..af20656 100644 --- a/js/custom/gravity_forms_golf_package.js +++ b/js/custom/gravity_forms_golf_package.js @@ -1,18 +1,18 @@ /*global document, window, alert, console, require*/ $(document).ready(function () { 'use strict'; - var input = document.getElementById('input_1_1').value, - golfersAm = document.getElementById('input_1_30'), - golfersPm = document.getElementById('input_1_31'), + var input = document.getElementById('input_2_1').value, + golfersAm = document.getElementById('input_2_30'), + golfersPm = document.getElementById('input_2_31'), i = null, el = null, gform_fields_1_3 = null, - starting_golf_date = document.getElementById('input_1_3').value, + starting_golf_date = document.getElementById('input_2_3').value, date1 = null, date2 = null, numDays = null, label = null, - newId = "#gform_fields_1_"; + newId = "#gform_fields_2_"; for (i = 1; i <= input; i += 1) { el = document.createElement("option"); @@ -28,12 +28,12 @@ $(document).ready(function () { golfersPm.appendChild(el); } - date1 = document.getElementById('input_1_6').value; + date1 = document.getElementById('input_2_6').value; date1.toString(); date1 = date1.replace(/\//g, ""); date1 = parseInt(date1, 10); - date2 = document.getElementById('input_1_33').value; + date2 = document.getElementById('input_2_33').value; date2.toString(); date2 = date2.replace(/\//g, ""); date2 = parseInt(date2, 10); @@ -43,7 +43,7 @@ $(document).ready(function () { // the number 3 in the iteration will properly assign a new ID to append to the existing one, since the page fields end with 2. 2 is added to numDays to account for 0 and the initial section created with form before the cloning. for (i = 3; i < numDays + 2; i += 1) { // alert(newId + i); - $('#gform_fields_1_2').clone().attr('id', newId + i).appendTo('#gform_page_1_2 .gform_page_fields'); + $('#gform_fields_2_2').clone().attr('id', newId + i).appendTo('#gform_page_2_2 .gform_page_fields'); } }); diff --git a/scss/plugins/_gravityforms.scss b/scss/plugins/_gravityforms.scss index ff97ab2..415f1ac 100644 --- a/scss/plugins/_gravityforms.scss +++ b/scss/plugins/_gravityforms.scss @@ -2,12 +2,12 @@ .gform_wrapper .top_label li.gfield.gf_left_third { margin-right: -15% !important; } -textarea#input_1_28.textarea.medium{ +textarea#input_2_28.textarea.medium{ width: 48%; } -select#input_1_9.medium.gfield_select{ +select#input_2_9.medium.gfield_select{ margin-bottom: -30px; } -div.gform_page_fields ul#gform_fields_1_2.gform_fields.top_label.form_sublabel_below.description_below{ +div.gform_page_fields ul#gform_fields_2_2.gform_fields.top_label.form_sublabel_below.description_below{ margin-bottom: 70px; } \ No newline at end of file -- 2.17.1