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>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'AW-000000000');
</script>

<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','AAA-AAAAAAA');</script>
<!-- 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.