How to set quantity input to empty?

KatieCTP
Tourist
7 0 1

We have donation products and use the quantity input as a "variable price" tool. So really it's a $1 gift but you can change the quantity input to 100 and it looks like a $100.

For some gifts, we would like to be able to empty the quantity input on the page so that customers aren't influenced by a default value. It would still have validation so customers can't use decimals, negative numbers or 0.

There seems to be some JS working on this input that isn't coming from theme.js (Supply theme) and the resultant HTML is this: 

<input type="text" class="js--num" value="" min="1" data-id="variable-price-selector" aria-label="quantity" pattern="[0-9]*" name="quantity" id="quantity" mm-min="1" step="1" mm-step="1">

It seems like the mm-min is what is initialising the input value to 1, any ideas where I can change this behaviour or override it would be much appreciated!

Here is an example gift: https://changingthepresent.org/products/costa-rica-sea-turtle-conservation-from-cirenas?variant=3928...

0 Likes