Required fields bypassed on cart despite 'required', dynamic checkout disabled, JS check

orangey
Visitor
3 0 1

Strangely, even when 'dynamic checkout buttons' is disabled, an 'required' attribute is added to the field, and there is a JS check in place, customers are somehow able to bypass required fields on the cart page. Anyone know how to resolve this please?

 

This is the JS check:

    $(document).on('submit', '#CartPageForm', function() {
      if (!$('#delivery-date-input').val()) {
        alert('Please select a delivery date');
        return false;
      }
    });

Is there a way to make this more solid?

 

I understand that disabling JS might be the result of this, but let's be real, the shop is unlikely to work at all without JS. And even if this was the issue for some, it certainly wouldn't be at the high rates that this issue is happening (~60%).

 

Any thoughts, fellow devs?

Replies 0 (0)