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


Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

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.