Benny_S Posted May 13, 2021 Share Posted May 13, 2021 (edited) Site URL: https://www.effektfootwear.com/signup Hi all. I have been scouring the web to figure this one out, found my way here, but cannot seem to get the code working. I'm looking to remove the "Last Name" field required for email sign up. I currently have business plan, have tried pasting a variety of codes I have found on the web and nothing seems to work. I am trying to apply this to the landing page where I have successfully removed the header and footer as I want the sign up to be the only action people can take. Is anyone able to help? Thanks, Ben. Edited May 13, 2021 by Benny_S Mapa 1 Link to comment
tuanphan Posted May 14, 2021 Share Posted May 14, 2021 Add to Settings > Advanced > Code Injection > Footer <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> I think this code by @sf.digital knellans and Lalat 1 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
Benny_S Posted May 18, 2021 Author Share Posted May 18, 2021 Thank you so much for your help! I really appreciate it!!!! Link to comment
Benny_S Posted May 18, 2021 Author Share Posted May 18, 2021 Just gave it a go and doesn't seem to work Its erroring, apparently the field still requires last name although the field block is not visible Take a look at the attached. Cheers, Ben. Link to comment
tuanphan Posted May 19, 2021 Share Posted May 19, 2021 15 hours ago, Benny_S said: Just gave it a go and doesn't seem to work Its erroring, apparently the field still requires last name although the field block is not visible Take a look at the attached. Cheers, Ben. Keep this code in Code injection Footer, then let me know. Wee can test code easier <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></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
Benny_S Posted May 19, 2021 Author Share Posted May 19, 2021 That seems to have done the trick! Have tested and is working a charm! Many thanks once again! Link to comment
JanuaryMade Posted November 13, 2021 Share Posted November 13, 2021 On 5/14/2021 at 9:03 PM, tuanphan said: Add to Settings > Advanced > Code Injection > Footer <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> I think this code by @sf.digital Hi @tuanphan, I am using this on a client site and it's working perfectly on the newsletter subscriber field (yay!) however it's affecting my contact form on my Contact page – would you happen to know how to adjust the above code to just work for the newsletter subscribe? Website: https://magnolia-sealion-mwc2.squarespace.com/contact Password: TMR2021 Thank you so much! Link to comment
tuanphan Posted November 15, 2021 Share Posted November 15, 2021 On 11/13/2021 at 8:56 AM, JanuaryMade said: Hi @tuanphan, I am using this on a client site and it's working perfectly on the newsletter subscriber field (yay!) however it's affecting my contact form on my Contact page – would you happen to know how to adjust the above code to just work for the newsletter subscribe? Website: https://magnolia-sealion-mwc2.squarespace.com/contact Password: TMR2021 Thank you so much! Try this <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/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> <style> .newsletter-form-field-wrapper.field.last-name { display: none; } </style> jinlikegold 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
chewyyy Posted August 16, 2022 Share Posted August 16, 2022 @tuanphanhi! I'm having trouble with my newsletter block using your code. It's successfully removed the field for last name but I keep getting this error: the website is: thegoodclub.com pw: strawberry thank you! Link to comment
tuanphan Posted August 18, 2022 Share Posted August 18, 2022 On 8/16/2022 at 10:43 AM, chewyyy said: @tuanphanhi! I'm having trouble with my newsletter block using your code. It's successfully removed the field for last name but I keep getting this error: the website is: thegoodclub.com pw: strawberry thank you! I just try submit an email. It looks fine to me. Can you check it again? 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
lindseykaszuba Posted July 11 Share Posted July 11 @tuanphan I've just tried to insert the below code to remove the last name email block and am also getting the error below. Website page: https://www.lindseykaszubahealth.com/join-email I'd also like to remove last name from the footer on ALL pages. Can you help with that as well? Link to comment
tuanphan Posted July 15 Share Posted July 15 On 7/12/2023 at 1:20 AM, lindseykaszuba said: @tuanphan I've just tried to insert the below code to remove the last name email block and am also getting the error below. Website page: https://www.lindseykaszubahealth.com/join-email I'd also like to remove last name from the footer on ALL pages. Can you help with that as well? Use this new 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> lindseykaszuba 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
lindseykaszuba Posted July 15 Share Posted July 15 @tuanphanexcellent - that worked. Thank you so much! Do you have any code/steps to remove the last name field from the footer that is on all pages? Link to comment
tuanphan Posted July 19 Share Posted July 19 On 7/16/2023 at 3:34 AM, lindseykaszuba said: @tuanphanexcellent - that worked. Thank you so much! Do you have any code/steps to remove the last name field from the footer that is on all pages? I don't see Last Name in Footer. Can you check it again? 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
lindseykaszuba Posted July 19 Share Posted July 19 @tuanphan it's been removed from the join email page but remains on all other pages. Do I need to adjust code for each individual page? Main site: https://www.lindseykaszubahealth.com/ Link to comment
tuanphan Posted July 22 Share Posted July 22 On 7/20/2023 at 12:55 AM, lindseykaszuba said: @tuanphan it's been removed from the join email page but remains on all other pages. Do I need to adjust code for each individual page? Main site: https://www.lindseykaszubahealth.com/ Have you tried this code? It should run on all pages <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> 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
lindseykaszuba Posted July 25 Share Posted July 25 @tuanphanyes I input that code on the join email page but it's not transferring over to affect the footer. Any other ideas? Link to comment
tuanphan Posted July 26 Share Posted July 26 12 hours ago, lindseykaszuba said: @tuanphanyes I input that code on the join email page but it's not transferring over to affect the footer. Any other ideas? Can you share link to Join Email page? 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
lindseykaszuba Posted July 26 Share Posted July 26 @tuanphanhere you go! Join email page - https://www.lindseykaszubahealth.com/join-email Main website + scroll to bottom to see footer - https://www.lindseykaszubahealth.com/ Link to comment
tuanphan Posted July 27 Share Posted July 27 14 hours ago, lindseykaszuba said: @tuanphanhere you go! Join email page - https://www.lindseykaszubahealth.com/join-email Main website + scroll to bottom to see footer - https://www.lindseykaszubahealth.com/ I see it worked here (I just entered a test submission in newsletter footer, you can check in email) 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
lindseykaszuba Posted July 31 Share Posted July 31 @tuanphanweird - I don't see the email submission on my end. I also still see the last name field on the footer... Link to comment
tuanphan Posted August 1 Share Posted August 1 16 hours ago, lindseykaszuba said: @tuanphanweird - I don't see the email submission on my end. I also still see the last name field on the footer... It is fine to me 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
bettylish123 Posted October 19 Share Posted October 19 I've added the share code but not working. After adding code and loading the website Last name value will be "-" as defined in the code but when typing the First Name or email than Last Name value is updated and empty. I tried jquery keyup to fill in the Last name but when I click the submit button the last name will be empty again. Experts, would you please help me with this? Thank you Link to comment
tuanphan Posted October 21 Share Posted October 21 On 10/20/2023 at 3:42 AM, bettylish123 said: I've added the share code but not working. After adding code and loading the website Last name value will be "-" as defined in the code but when typing the First Name or email than Last Name value is updated and empty. I tried jquery keyup to fill in the Last name but when I click the submit button the last name will be empty again. Experts, would you please help me with this? Thank you What is page url? We can check easier 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