I am trying to build a Joomla website with an AcyMailing subscription form.
I'd like the form to be a pop-up window. I have researched thoroughly and I have achieved most of what I want.
Now I have a pop-up form (as an AcyMailing subscription module), but the form closes when I click in the form.
When I click outside the form, it does nothing -- as desired.
Here is the code I am using:
<script>
// When the user clicks on <div>, open the popup
function myFunction() {
var popup = document.getElementById("myPopup");
popup.classList.toggle("show");
}
</script>
<div class="popup" onclick="myFunction()">CLICK HERE TO SUBSCRIBE
<span class="popuptext" id="myPopup">
<table class="acym_form">
*(the acy mailing form module here)*
</table>
</span>
</div>
Does anyone have a solution for this?