Jump to content

Newsletter Form Customization

Recommended Posts

Posted

Hi, I have a question about the newsletter forms. I've used the code below to modify the forms so that 'Name' and 'Email Address' are displayed as fields. 'First Name' from the original form was changed to 'Name,' and 'Email' was renamed to 'Email Address.' This has worked for all previous forms. However, I recently created a new form (located at the very bottom of the page, link attached), and suddenly the original label is showing up for the name field. How can this be? How can I adjust the code so that it also displays just 'Name' there?

Looking forward to your help!

Site Link:
https://maltemartenmethod.com/teacher-training
password: tt2024

Code:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $('.last-name input').attr('value','NA');
  $('.last-name').attr('style','display:none;');
});
</script>

<script>
(function() {
document.querySelector(".first-name input").setAttribute("placeholder", "Name"); 
})()
</script>


<script>
(function() {
document.querySelector(".email input").setAttribute("placeholder", "Email Address"); 
})()
</script>

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.