From 5ced6d9611b4608d1e5003f127cc6fe4ffb99c56 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 22 Jul 2025 06:08:29 +0000 Subject: [PATCH 1/3] Add auto-fill subject for contact form based on selected pricing plan Co-authored-by: lucaswan348 --- script.js | 18 +++++++++++++++++- test.js | 1 + 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 test.js diff --git a/script.js b/script.js index a70ffeb..596b832 100644 --- a/script.js +++ b/script.js @@ -362,4 +362,20 @@ style.textContent = ` 50% { transform: translateY(-20px) rotate(180deg); opacity: 1; } } `; -document.head.appendChild(style); \ No newline at end of file +document.head.appendChild(style); +// Auto-fill contact form subject based on selected pricing plan +document.addEventListener('DOMContentLoaded', () => { + document.querySelectorAll('.pricing-card a[href="#contact"]').forEach(btn => { + btn.addEventListener('click', () => { + const card = btn.closest('.pricing-card'); + if (!card) return; + const planName = card.querySelector('.pricing-header h3')?.textContent.trim(); + const price = card.querySelector('.price .amount')?.textContent.trim(); + const subjectInput = document.querySelector('#contact input[placeholder="Subject"]'); + if (subjectInput && planName && price) { + subjectInput.value = `$${price} ${planName} Plan`; + } + }); + }); +}); + diff --git a/test.js b/test.js new file mode 100644 index 0000000..a2248ef --- /dev/null +++ b/test.js @@ -0,0 +1 @@ +console.log('test'); From dacfeea5a66610459e604657dbf28a0519aac36d Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 22 Jul 2025 06:10:46 +0000 Subject: [PATCH 2/3] Set focus on subject input after populating with plan details Co-authored-by: lucaswan348 --- script.js | 1 + 1 file changed, 1 insertion(+) diff --git a/script.js b/script.js index 596b832..a61e1f7 100644 --- a/script.js +++ b/script.js @@ -374,6 +374,7 @@ document.addEventListener('DOMContentLoaded', () => { const subjectInput = document.querySelector('#contact input[placeholder="Subject"]'); if (subjectInput && planName && price) { subjectInput.value = `$${price} ${planName} Plan`; + subjectInput.focus(); } }); }); From ffc6ad4c6d4b844e668439e8b7b9e3bf451bebaf Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 22 Jul 2025 06:17:16 +0000 Subject: [PATCH 3/3] Remove test logging statement Co-authored-by: lucaswan348 --- test.js | 1 - 1 file changed, 1 deletion(-) delete mode 100644 test.js diff --git a/test.js b/test.js deleted file mode 100644 index a2248ef..0000000 --- a/test.js +++ /dev/null @@ -1 +0,0 @@ -console.log('test');