Jump to content

momo2000

Member
  • Posts

    6
  • Joined

  • Last visited

Posts posted by momo2000

  1. Since May 2020, I had used the code below in "Code Injection" to default the State and Country fields, and then hide the Country fields for all of the forms on my site.  But it seems that Squarespace had an update a few months ago that broke this.   I'd like to know what I can do (code changes) to get that functionality back.  Below is the code I used and source.

    <!--added by MOAKES 5/24/20 from https://forum.squarespace.com/topic/141931-autofill-country-field-in-form-on-index-page/#comment-183491 --> 
     <script>
         Y.on("domready", function(){
         Y.all('input[name="state"]').setAttribute("value", "GA");
         Y.all('input[name="country"]').setAttribute("value", "USA");  
         });
    </script>
    <style>
       .field.country {
          display: none;
       }
    </style>
    <!--  End MOAKES -->

     

  2. I've searched and see that you can change the color of ALL of the input background fields.  I have a use case where I need 3 different colors for the input fields on ONE page:  #1. Normal for most fields.   #2. Blue background for "male" fields. #3. Pink background for "female" fields.   This is for a nonprofit agency that provides resources to low income families, but we need to capture 4 numbers from each family (Number of Male Adults, Number of Male Children, Number of Female Adults, Number of Female Children) for grant purposes, and was trying to make things more obvious (and redesign the form), because as simple as it sounds, the caseworkers are having trouble with this.  Thx.

×
×
  • 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.