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

 

Improve your online store with our extensions.
About: Squarespace Circle Leader since 2017. I value honesty, transparency, appreciation 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.

Buy me a coffee

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.