Jump to content

Code Injection causing time field to be required

Recommended Posts

Site URL: https://alexanderstaffing.com/rsvp-deliveries

The form on this website is requiring time fields when I have not marked them as required. See for yourself. alexanderstaffing.com/rsvp-deliveries. Just press submit at the bottom to see required time fields.

I've been told by Squarespace Support that my the code injection on my site is causing the issue. They said they cannot do anything about it and to check with this forum. I'm not sure where to begin.

My code injections (that I changed in case there might be identifiable information that I shouldn't share? Not even sure if that matters...):

  • Header: 

<!-- Global site tag (gtag.js) - Google Ads: 000000000 -->
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-000000000"></script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'AW-000000000');

<!-- Google Tag Manager -->
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
<!-- End Google Tag Manager -->

  • Footer:

<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=AAA-AAAAAAA"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->


Link to comment
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

29 minutes ago, alexstaff said:

The form on this website is requiring time fields when I have not marked them as required.

You'll need to remove the last section of code, starting with "<!-- You may..". This code is a simple workaround that hides the 'seconds' box on Time fields. In doing so, it makes the time field mandatory.


About: Squarespace Circle Leader since 2017. I value honesty, transparency, diversity and great design ♥.
Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™. 
Content: Links in my posts may refer to SF Digital products or may be affiliate links.

Catch up on all the release notes and announcements 2023 [for Circle members only]. There's a public version here too!
If I helped, you can thank me by clicking one of the emojis below. If you prefer, you can buy me a coffee.
Improve your online store with our extensions.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

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