Hello @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.
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]});
Hello @eberkland
You should include the quantities property in the object you pass as the parameter in the setChoices method.
getField(fieldname455|n).setChoices({texts:['Accent Shelf'], values:[fieldname331], quantities:[45]});
Instead of 45, you can use a field’s name.
Best regards.
You’re the best! This completely solved several workarounds I was doing. Thanks.
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]});
Hello @eberkland
You can do it with some code. For example, the equation’s code might be:
getField(fieldname455|n).jQueryRef().find('[type="number"]').attr('max', fieldname123);
Best regards.