WBRenes Posted March 21 Share Posted March 21 Hi, Site: theimerian.com PW: B^tt3rB^tt I am trying to remove the Last Name from the Newsletter subscribe form. I found code in another post, and it does remove the Last Name from view, but apparently a value still needs to be added to the data storage field. Is there a way to remove Last Name completely and not have 'NA' or '-' appended to the First Name? This is what I have currently in the footer code injection. <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script> <script> $(document).ready(function(){ lastName = document.querySelector('.last-name input'); lastName.value = "-"; hideLastName = document.querySelector('.last-name'); hideLastName.style.display = "none"; }); </script> Thank you in advance for your help. Link to comment
Solution creedon Posted March 21 Solution Share Posted March 21 Quote Is there a way to remove Last Name completely No. You can hide it visually in the browser but that hiding has no effect on what SS expects to receive when the form is submitted. Hence you have to supply a value for the Last Name field behind the scenes. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. 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