Jump to content

Jamz

Member
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Jamz

  1. Genius! Thank you so much. This worked: <script> document.addEventListener('DOMContentLoaded', () => { var qty = document.querySelector('input[type="number"]'); qty.setAttribute('max', '5'); }); </script>
  2. I am trying to limit the qty a customer can order using the below script. The script is supposed to change the quantity input tag to have max="5", but it is not working. Is the issue with my code, or something to do with SquareSpace? I do know that the page loads with max="9999" by default, is there something I'm missing to override that? <script> var qty = document.querySelectorAll('input[type="number"]'); qty.setAttribute('max', '5'); </script>
×
×
  • 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.