Hide the Last Name in a Newsletter Block
What does this code do?
This code snippet will allow you to hide the last name in a Newsletter Block. Take note that subscribers in your email system will have a last name of “-”.
Code Snippets
Javascript
Copy and paste this code into the Footer Code Injection.
<!-- Hide Last Name in Newsletter Block --> <script> (function () { var lastName = document.querySelectorAll(".newsletter-form .last-name input"); for (var i = 0; i < lastName.length; i++) { lastName[i].value = "-"; } })(); </script>
CSS
Then copy and paste this code into the Custom CSS.
.newsletter-form .last-name { display: none !important; }
How To Use It
Copy and paste the code as indicated above.
For more information on where to paste the code, check out our Start Here guide.