# Quantity Field Visibility for Checkbox Product Cards

If you have an add-on product that uses a per unit, tiered, or volume pricing model, and you want to display the quantity field when the checkbox is selected, you can use the following code:

```html
<div data-bind="visible: checked()">

<input type="text" class="input-spinner" min="1" data-bind="value: quantity">

</div>
```

This is in combination with the checkbox code:

```html
<input type="checkbox" id="additional-option-#{id}#" data-bind="checked: checked">
```

&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.peakcommerce.com/developers/product-cards/quantity-field-visibility-for-checkbox-product-cards.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
