Title: Checkbox Include Quantity Boxes
Last modified: January 8, 2025

---

# Checkbox Include Quantity Boxes

 *  Resolved [eberkland](https://wordpress.org/support/users/eberkland/)
 * (@eberkland)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/checkbox-include-quantity-boxes/)
 * In the settings for checkbox field there are two choices to tick:
    - Include quantity boxes
    - Display when choice ticked
 * How does this work? I could not find anything in the [documentation](https://cff.dwbooster.com/documentation)
   or on this forum.

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [CodePeople2](https://wordpress.org/support/users/codepeople2/)
 * (@codepeople2)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/checkbox-include-quantity-boxes/#post-18232152)
 * Hello [@eberkland](https://wordpress.org/support/users/eberkland/)
 * By ticking the quantity boxes checkbox the plugin displays a number input tag
   per checkbox choice and as the field’s value the plugin multiples the choice’s
   value by the quantity.
 * If you tick the “Display when choice ticked” attribute in the checkbox field’s
   settings, the plugin will display the number input tag only if the corresponding
   choice is ticked.
 * Best regards.
 *  Thread Starter [eberkland](https://wordpress.org/support/users/eberkland/)
 * (@eberkland)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/checkbox-include-quantity-boxes/#post-18232206)
 * Thanks, user error on that one, I see quantity boxes now.
 * I am assigning texts and values to checkbox fields (see example below), is there
   a way to assign an initial value for the checkbox quantity from another field?
 * getField(fieldname455|n).setChoices({texts:[‘Accent Shelf’], values:[fieldname331]});
 *  Plugin Author [CodePeople2](https://wordpress.org/support/users/codepeople2/)
 * (@codepeople2)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/checkbox-include-quantity-boxes/#post-18232224)
 * Hello [@eberkland](https://wordpress.org/support/users/eberkland/)
 * You should include the quantities property in the object you pass as the parameter
   in the setChoices method.
 *     ```wp-block-code
       getField(fieldname455|n).setChoices({texts:['Accent Shelf'], values:[fieldname331], quantities:[45]});
       ```
   
 * Instead of 45, you can use a field’s name.
 * Best regards.
 *  Thread Starter [eberkland](https://wordpress.org/support/users/eberkland/)
 * (@eberkland)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/checkbox-include-quantity-boxes/#post-18232237)
 * You’re the best! This completely solved several workarounds I was doing. Thanks.
 *  Thread Starter [eberkland](https://wordpress.org/support/users/eberkland/)
 * (@eberkland)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/checkbox-include-quantity-boxes/#post-18287539)
 * Follow-up question on this topic.
 * On my closet builder calculator, users can select the number of drawers they 
   want in a number field (fieldname123)
 * Then they can select the number of knobs they want in a checkbox field (with 
   quantity options ticked).
 * They can select less than the number of chosen drawers, but not more.
 * Is there a way to set quantities assigned to the checkbox as the max-value. So
   users would not be able to select more than the quantity in fieldname123.
 * getField(fieldname455|n).setChoices({texts:[‘Drawer Knobs’], values:[fieldname331],
   quantities:[fieldname123]});
 *  Plugin Author [CodePeople2](https://wordpress.org/support/users/codepeople2/)
 * (@codepeople2)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/checkbox-include-quantity-boxes/#post-18287683)
 * Hello [@eberkland](https://wordpress.org/support/users/eberkland/)
 * You can do it with some code. For example, the equation’s code might be:
 *     ```wp-block-code
       getField(fieldname455|n).jQueryRef().find('[type="number"]').attr('max', fieldname123);
       ```
   
 * Best regards.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Checkbox Include Quantity Boxes’ is closed to new replies.

 * ![](https://ps.w.org/calculated-fields-form/assets/icon-256x256.jpg?rev=1734377)
 * [Calculated Fields Form](https://wordpress.org/plugins/calculated-fields-form/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/calculated-fields-form/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/calculated-fields-form/)
 * [Active Topics](https://wordpress.org/support/plugin/calculated-fields-form/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/calculated-fields-form/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/calculated-fields-form/reviews/)

## Tags

 * [checkbox field](https://wordpress.org/support/topic-tag/checkbox-field/)

 * 6 replies
 * 2 participants
 * Last reply from: [CodePeople2](https://wordpress.org/support/users/codepeople2/)
 * Last activity: [1 year, 3 months ago](https://wordpress.org/support/topic/checkbox-include-quantity-boxes/#post-18287683)
 * Status: resolved