Set quantity input to start at a number larger than 1

Topic summary

A developer is implementing a quantity input field that should start at 10 units for products tagged with ‘MIN10’, but the value briefly displays ‘10’ before reverting to ‘1’.

Current Implementation:

  • Using conditional logic to check for ‘MIN10’ tag in product tags
  • Setting both min="10" and value="10" attributes on the input field
  • Including an oninput handler calling changeMinQuantity(this, 10)

The Problem:
The initial value of 10 appears momentarily but is then overridden back to 1, suggesting JavaScript or form logic elsewhere in the codebase is resetting the value after initial render.

Status: The issue remains unresolved. The developer notes the site is in development but doesn’t believe this should affect functionality. No solutions or responses have been provided yet.

Summarized with AI on November 13. AI used: claude-sonnet-4-5-20250929.

Hi all,

I have set up the following to work for products that need to start with a quantity of 10. The MIN10 tags are all set up and I thought the following code should work but it doesn’t. The number 10 appears for a second and is then replaced with the 1. Note that the site is in development, but I don’t think it should make a difference?

Thanks in advance for your help.

Here’s the code:

{% if product.tags contains ‘MIN10’ %}


{{ ‘products.product.quantity.decrease’ | t: product: product.title | escape }}
{% render ‘icon-minus’ %}

<input class=“quantity__input”
type=“number”
name=“quantity”
id=“Quantity-{{ section.id }}”
min=“10”
value=“10”
form=“{{ product_form_id }}”
oninput=“changeMinQuantity(this, 10)”

{{ 'products.product.quantity.increase' | t: product: product.title | escape }} {% render 'icon-plus' %} {% else %} {{ 'products.product.quantity.decrease' | t: product: product.title | escape }} {% render 'icon-minus' %} {{ 'products.product.quantity.increase' | t: product: product.title | escape }} {% render 'icon-plus' %} {% endif %}