How to remove ‘last name’ from newsletter sign up form - Squarespace 7.1

<!--Removes "Last name" from Newsletter sign up form -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>

<script>
 const lnames = document.querySelectorAll('.last-name input')
   const lnameFields = document.querySelectorAll('.last-name')
  $(document).ready(function(){

     lnames.forEach(lname => {
   lname.value = "-"
  })

     lnameFields.forEach(lnameField => {
     lnameField.style.display = "none"
  })
      
     
 });
</script>
Previous
Previous

Top Tips for a Smooth-Sailing Visual Rebrand

Next
Next

How to active safe mode and disable / turn off scripts in edit mode - Squarespace 7.1