From 00a7d97b21acdec21b9e20f671b97ec20c4c8c59 Mon Sep 17 00:00:00 2001 From: Ryan Mwangi Date: Tue, 15 Oct 2024 14:42:37 +0300 Subject: [PATCH] edit event listener to handle only one link group name submission --- script.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/script.js b/script.js index 62488fe..3e964e1 100644 --- a/script.js +++ b/script.js @@ -9,7 +9,6 @@ const form = document.getElementById('merge-form'); const newCalendar = document.createElement('div'); newCalendar.className = 'calendar'; newCalendar.innerHTML = ` - @@ -21,9 +20,9 @@ const form = document.getElementById('merge-form'); form.addEventListener('submit', (event) => { event.preventDefault(); + const linkGroupName = document.getElementById('link-group-name').value; const calendarsData = []; for (let i = 0; i < calendarIndex; i++) { - const linkGroupName = document.getElementById(`link-group-name-${i}`).value; const prefix = document.getElementById(`prefix-${i}`).value; const override = document.getElementById(`override-${i}`).checked; const url = document.getElementById(`url-${i}`).value;