lehuaflow14 Posted June 16, 2021 Share Posted June 16, 2021 Site URL: https://www.rjplandscapingservices.com/ Hello, I was wondering how I could remove Country from my form block, although the address section is required. The form is found in the 'Contact Us' page. Also, is there a way I can make the header transparent for the homepage only? Or when scrolling down, how can I change the color of the header to match my footer? When I set it to transparent, I don't really want it to match the color of the first section. And finally, I added CSS to make the header have a drop shadow, but is there a way to change it where the drop shadow only appears when scrolling? If I change the header to be transparent, it leaves a black line. Thank you! Link to comment
creedon Posted June 16, 2021 Share Posted June 16, 2021 (edited) Currently your address field appears not to be required which allows you to do the following. This appears to have changed you need to use the required field technique mentioned below. Add a code block to the top of the page. Add the following to the field. <style> .country { display : none; } .state-province .caption-text { display : none; } .state-province .caption::after { content : 'State'; } </style> If you make the address field required read the following as that will require a change in approach. Let us know how it goes. Edited March 3, 2022 by creedon Noz and lehuaflow14 1 1 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
lehuaflow14 Posted June 16, 2021 Author Share Posted June 16, 2021 (edited) Hi Creedon, thanks for your reply! And shoot, yeah the address section is supposed to be required. If it's very difficult to remove 'Country' from the section when it's required, should I make it not required instead as a workaround? Also is there a way to remove 'Province'? I'd like it to just be State. Thank you! Edited June 16, 2021 by lehuaflow14 Needed to add one more question Link to comment
creedon Posted June 16, 2021 Share Posted June 16, 2021 It is more involved to hide the country field when address is required. So it just depends on how far you want to go to achieve your goals. If the form is meant to provide a means for a potential customer to have someone come by to give a free estimate then it might be important to require the address. On the other hand requiring an address might put some people off. I know my personal feeling is if a web site asks for to much personal information right off, I get turned off and leave. I'd rather give my information in bites. First my name and email and perhaps a general area where I'm located. Then if after the initial contact goes well, I would be willing to give my address for someone to visit. This is where you have to gauge your market and decide what works for you and them. As far a code goes there are "solutions" for both scenarios. A caveat. When hiding a country field on a required address the field is not actually removed it is just hidden and filled with a default value. That value stills travels through the SS system and is still visible to the user at points. Order confirmations and such. 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
lehuaflow14 Posted June 16, 2021 Author Share Posted June 16, 2021 You have a good point about providing addresses right off the bat, I'll leave that section as optional. Would you happen to know how to remove 'Province' as well? I'd like it to just be 'State' if possible. Link to comment
creedon Posted June 16, 2021 Share Posted June 16, 2021 I have updated my code post. lehuaflow14 1 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
lehuaflow14 Posted June 16, 2021 Author Share Posted June 16, 2021 It worked perfectly, thank you so much! creedon 1 Link to comment
chrisdaigneault Posted March 3, 2022 Share Posted March 3, 2022 On 6/16/2021 at 6:13 PM, lehuaflow14 said: It worked perfectly, thank you so much! I have tried this code, even though the field is not required and still sees it as an empty when someone fills in their address and there is no country. Any tips? Link to comment
creedon Posted March 3, 2022 Share Posted March 3, 2022 1 hour ago, chrisdaigneault said: even though the field is not required and still sees it as an empty when someone fills in their address and there is no country. Any tips? It appears the not required address field functionality has changed. Actually it makes sense. If any part of the field is filled in then most folks would probably want all the information. Several options. Build the address info yourself from text fields. Use the required address field technique mentioned above. Use an outside form provider like JotForm. chrisdaigneault 1 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
clementinedesignstudio Posted March 2 Share Posted March 2 (edited) You can auto-populate the country using the code found here: https://clementinedesign.studio/plugins/auto-populate-the-country-in-address-form-field Edited May 3 by clementinedesignstudio 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