document.getElementById('generateButton').addEventListener('click', function () { const form = document.getElementById('productDetailsForm'); const formData = new FormData(form); let generatedText = '';
for (const [key, value] of formData.entries()) { generatedText += `${key.replace(/_/g, ' ')}: ${value}\n`; }
document.getElementById('generatedText').value = generatedText; }); });