Angela1980 Posted May 26, 2020 Share Posted May 26, 2020 HI everyone I can't seem to find anywhere to remove the the last name field on the newsletter form block? I only want to ask for people's FIRST name and email, NOT their last name, and not just their email. There seems to be no option for this. Would this be a coding thing? I hope not..... AsiaForum 1 Link to comment
tuanphan Posted May 27, 2020 Share Posted May 27, 2020 You can't remove Last name field unless using JavaScript (Need a Business Plan). If you use Business Plan, you can share link to page where you use newsletter block, I can take a look. Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
taylorlaidlaw Posted August 8, 2020 Share Posted August 8, 2020 Hi Tuan, How do I delete the last name field on all of the newsletter blocks on this site? https://grape-gerbil-aby9.squarespace.com/ password: hustle Thank you!! Link to comment
tuanphan Posted August 11, 2020 Share Posted August 11, 2020 On 8/9/2020 at 12:52 AM, taylorlaidlaw said: Hi Tuan, How do I delete the last name field on all of the newsletter blocks on this site? https://grape-gerbil-aby9.squarespace.com/ password: hustle Thank you!! Add to Page Settings > Advanced > Header <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/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> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
BXDesign Posted February 9, 2022 Share Posted February 9, 2022 Hello @tuanphan, Just used your script to remove the last name on a newsletter form and it worked perfectly! Is there any way to tweak it so it doesn't affect a regular contact form where the last name could be required? Thank you so much :) Link to comment
tuanphan Posted February 14, 2022 Share Posted February 14, 2022 On 2/10/2022 at 12:30 AM, BxDesign said: Hello @tuanphan, Just used your script to remove the last name on a newsletter form and it worked perfectly! Is there any way to tweak it so it doesn't affect a regular contact form where the last name could be required? Thank you so much :) try this new code <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script> <script> const lnames = document.querySelectorAll('.newsletter-block .last-name input') const lnameFields = document.querySelectorAll('.newsletter-block .last-name') $(document).ready(function(){ lnames.forEach(lname => { lname.value = "-" }) lnameFields.forEach(lnameField => { lnameField.style.display = "none" }) }); </script> pandora23, sayreambrosio, BXDesign and 1 other 1 2 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
BXDesign Posted February 26, 2022 Share Posted February 26, 2022 On 2/14/2022 at 2:29 PM, tuanphan said: try this new code <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script> <script> const lnames = document.querySelectorAll('.newsletter-block .last-name input') const lnameFields = document.querySelectorAll('.newsletter-block .last-name') $(document).ready(function(){ lnames.forEach(lname => { lname.value = "-" }) lnameFields.forEach(lnameField => { lnameField.style.display = "none" }) }); </script> Worked perfectly, thank you so much 🙂 pandora23 1 Link to comment
pandora23 Posted December 29, 2022 Share Posted December 29, 2022 (edited) Hello @tuanphan — I am so grateful to you for posting a solution to specifically remove the last name field and last name input from the newsletter only, not anything else. THANK YOU. 🙌 Edited December 29, 2022 by pandora23 tuanphan 1 Link to comment
melaniejaane Posted June 1 Share Posted June 1 (edited) On 2/15/2022 at 2:29 AM, tuanphan said: try this new code <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script> <script> const lnames = document.querySelectorAll('.newsletter-block .last-name input') const lnameFields = document.querySelectorAll('.newsletter-block .last-name') $(document).ready(function(){ lnames.forEach(lname => { lname.value = "-" }) lnameFields.forEach(lnameField => { lnameField.style.display = "none" }) }); </script> Hey @tuanphan I tried adding this code to page settings and site wide code injection header but neither seem to have worked. Would you possibly be able to take a look please? Newsletter block is at the very bottom of the page (sorry it's messy – being used for sidebar) https://beehyve.squarespace.com/sidebar-2 password:abc Thanks so much! 🙂 Edited June 1 by melaniejaane update link + password Link to comment
tuanphan Posted June 3 Share Posted June 3 On 6/1/2023 at 11:51 AM, melaniejaane said: Hey @tuanphan I tried adding this code to page settings and site wide code injection header but neither seem to have worked. Would you possibly be able to take a look please? Newsletter block is at the very bottom of the page (sorry it's messy – being used for sidebar) https://beehyve.squarespace.com/sidebar-2 password:abc Thanks so much! 🙂 Hi, Add it to Sitewide Code Injection > Footer Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
melaniejaane Posted June 6 Share Posted June 6 On 6/4/2023 at 11:28 AM, tuanphan said: Hi, Add it to Sitewide Code Injection > Footer Hey @tuanphan I've tried adding it to the Footer but it's still not working. Any idea why? Thanks again 🙂 Link to comment
tuanphan Posted June 9 Share Posted June 9 On 6/7/2023 at 5:03 AM, melaniejaane said: Hey @tuanphan I've tried adding it to the Footer but it's still not working. Any idea why? Thanks again 🙂 Try this new code. If it still doesn't work, keep the code in Code Injection, then we can check it easier <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script> <script src="https://storage.googleapis.com/squarestylist/translate-style.js"></script> <script> $(document).ready(function(){ $('.last-name input').attr('value','NA'); $('.last-name').attr('style','display:none;'); $('.first-name input').attr('placeholder',' '); $('.email input').attr('placeholder',' '); }); </script> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
LillianC Posted July 2 Share Posted July 2 Hello how do I remove the last name field from the newsletter in the footer of all pages on this website? None of the code above is working for me https://www.rooftopbar.co/about Link to comment
tuanphan Posted July 4 Share Posted July 4 On 7/2/2023 at 7:05 PM, LillianC said: Hello how do I remove the last name field from the newsletter in the footer of all pages on this website? None of the code above is working for me https://www.rooftopbar.co/about This code should work, I tested it again last night. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script> <script> $(document).ready(function(){ $('.last-name input').attr('value','NA'); $('.last-name').attr('style','display:none;'); }); </script> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
LillianC Posted July 10 Share Posted July 10 (edited) Hello I've removed the last name section, but now you cant complete the form without this error. How do I fix? Edited July 10 by LillianC wrong image Link to comment
tuanphan Posted July 10 Share Posted July 10 On 7/2/2023 at 7:05 PM, LillianC said: Hello how do I remove the last name field from the newsletter in the footer of all pages on this website? None of the code above is working for me https://www.rooftopbar.co/about The url doesn't exist Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
LillianC Posted July 10 Share Posted July 10 (edited) Sorry, the page was hidden. The newsletter sign up block on the footer of every page on this website? https://www.rooftopbar.co/ I;ve added in your code above, is there a way to get first name , email address sitting closer to the white underline? Also this new code as made the Email address text much larger than First name. How can I style the same? Edited July 11 by LillianC Link to comment
tuanphan Posted July 11 Share Posted July 11 9 hours ago, LillianC said: Sorry, the page was hidden. The newsletter sign up block on the footer of every page on this website? https://www.rooftopbar.co/ I;ve added in your code above, is there a way to get first name , email address sitting closer to the white underline? Also this new code as made the Email address text much larger than First name. How can I style the same? Use this code under footer.sections .newsletter-form-body input { padding-bottom: 0px !important; } footer.sections .newsletter-form-body .form-fields input { font-size: 16px !important; } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment