document.addEventListener("DOMContentLoaded", function() { var form = document.querySelector('#Legal-Risk-Assessment'); // Select the form by its ID var button = document.querySelector('.sqs-block-button'); // Select the button by its class // Initially hide the form (just in case) form.style.display = 'none'; // Add click event listener to the button to toggle form visibility button.addEventListener('click', function(e) { e.preventDefault(); // Prevent the default action (in case the button is linked somewhere) // Toggle the display property of the form if (form.style.display === 'none') { form.style.display = 'block'; // Show the form } else { form.style.display = 'none'; // Hide the form again } }); });