Jump to content

wpj

Circle Member
  • Posts

    2
  • Joined

  • Last visited

Posts posted by wpj

  1. @Ian_A — thanks for this solution! I've tried implementing it, but it's not working properly. When I check the console it says "Can't find variable: $".

     

    Here's the code in full I used:

    <script>
      $(document).ready(function(){ 
        var timecode = Date.now();
        var subjecttxt = "#" + timecode;
      
      $('form').find("input[type=text], text").each(function()
      {
          if(!$(this).val()) { 
         $(this).attr("value", subjecttxt);
         $(this).attr("readonly", true);
         $(this).css("display","none");
            var val = subjecttxt;
            return ( val !== subjecttxt );
      }
      });
    });
    
      $(document).ready(function(){ 
    $('form').find("label[class=title]").each(function()
      {
          if(!$(this).val()) { 
         $(this).css("display","none");
            var val2 = "none";
            return ( val2 !== "none" );
      }
      });
    });  
     </script>

    Is this still working on your end? Any thoughts would be much appreciated, thank you.

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