Jump to content

Newsletter making last name not required

Recommended Posts

Site URL: https://synthesizer-sphere-deh5.squarespace.com/

https://synthesizer-sphere-deh5.squarespace.com/

 

Hi! I have a client who wanted a custom newsletter that asks for "your name" (this normally says "first name") "your dog's name" (which normally says "your last name") and then your email. I was able to create this using the code below. However, now she wants the "your dog's name" input to be optional, right now it is required - I assume because not everyone has a dog. Can you help me figure out how to do this? 

 

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
 jQuery(document).ready(function($){
  $('div#block-yui_3_17_2_1_1721835085797_5040 .name input').attr("placeholder","Your Name");
})
</script>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
 jQuery(document).ready(function($){
  $('div#block-yui_3_17_2_1_1721835085797_5040 .last-name input').attr("placeholder","Your Dog's Name");
})
</script>

 

Link to comment
  • Replies 4
  • Views 496
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

8 minutes ago, kaydotjpg said:

@Ziggy do you think you could help me with this time sensitive coding request?  

When I test the form I can submit without putting either name field in.

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️ Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment
3 hours ago, kaydotjpg said:

For some reason that's not the case, at least from my computer or my client's computer. Attached is the message I get. 

It was me submitting the test@test.com email address, did that get added correctly?

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️ Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment

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.