Eliminate Last Name Field From Newsletter Block in Squarespace

Eliminate Last Name Field From Newsletter Block in Squarespace

Squarespace’s newsletter block does not provide an option for requesting the first name only of a subscriber.


When toggling on the ‘Require Name Field,’ both the first and last name of the subscriber are required.

 
 
Required Name Field in Newsletter Form Block in Squarespace
 
 


This may cause some subscribers to refrain from subscribing. Other Email Service Providers like ConvertKit have an option for requesting the first name only of the subscriber, making visitors more like to subscribe.

 
 

First and Last Name Required

Squarespace newsletter block form displaying first and last name
 
 
 

First Name Only

Squarespace newsletter form block displaying first name only
 
 
 

In this tutorial, I’m going to show you how to eliminate the last name field from the Squarespace newsletter block using a bit of code injected in the footer of your Squarespace website.


And before you go, be sure to check out my other website strategy blog posts for more tips on attracting and engaging your target audience to your Squarespace website.

 
 

How to Eliminate the Last Name Field From the Newsletter Form Block in Squarespace

  1. Head on over to ‘Pages’

  2. Scroll all the way down to ‘Website Tools’

  3. Select ‘Code Injection’

  4. In the footer, copy and paste the code below (scroll down)

  5. Select save


So easy, right?

 
 

Here’s the Code

 

<!-- Eliminate Last Name Field From Newsletter Block -->

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.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>

<style>

.newsletter-form-field-wrapper.field.last-name {

display: none;

}

</style>

 
 

Was this helpful?

Are you using Squarespace campaigns? Have you considered switching to a more robust and functional Email Service Provider like ConvertKit? Share your thoughts 👇


 
 

This page contains affiliate links

 
 

My Insta

@jenxwebdesign

 

Like this post?

Pin It to Pinterest 👇

Eliminate Last Name Field From Newsletter Block in Squarespace
Jennifer Barden

This article was written by Jennifer Barden, founder of Jen-X Website Design and Strategy.

Many Squarespacers feel defeated when their websites don’t attract and engage visitors.

In my blog, I share my secrets for effective Squarespace website design and strategy so that DIYers and Squarespace Website Designers can learn tips for building Squarespace websites that attract and engage the right visitors.

https://jenxwebdesign.com
Previous
Previous

How to Blog to Nurture Your Audience and Grow Your Business

Next
Next

How to Use Your Blog to Grow Your Email List