PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Quantity Option for Checkbox

  1. I have this monster form that I've created using gravity forms.

    http://happiness.behladesign.com/build-a-package/

    After the client saw it, he wanted to add a quantity option for each item.

    I'd like to make it so that if a user clicks the checkbox, then a quantity option shows and the person can add the quantity they need for that item.

    The use should be able to choose more than one item too.

    Do you have any ideas on how I can do this?

    Posted 11 years ago on Thursday February 28, 2013 | Permalink
  2. How did you add those products to the form? The product field type does not offer checkboxes. Are you just using regular checkboxes? Maybe they are a checkbox group? So all 12 of those items on the first page are all one checkbox field? Is the whole form built like that?

    If you want to show a quantity field after someone checks a box, you can use conditional logic. You would have to insert a field to hold the quantity entry right after each checkbox, then use conditional logic to reveal it when the box is checked. That means you will not be able to use all one group of checkboxes though, because the conditional quantity fields would each appear after all the checkboxes, not inline.

    Posted 11 years ago on Monday March 4, 2013 | Permalink
  3. Hi Chris,

    Yes, you are right, I'm using checkboxes, so the first list is a group of 12 on the first page and each page has its own set. The whole form is built like that. I'm not using products as the whole form is in effect a product integrating with woo commerce and the GF extension for WC.

    How can i insert the field in a group of checkboxes, so that each entry comes right after the checkbox? Do i have to create a separate checkbox field and then the conditional logic? Is there anyway that I can do this with the way the form is currently created?

    You are right on, with the way it is, because if it is one group and i add the conditional logic, it will put the quantity under the checkboxes. I have it on this page: http://brainboxcamera.wpengine.com/shop/testing-form-checkout/

    As you can see, I have many products and many checkboxes, so I'm looking for the best solution to satisfy the need for the form, while making it clear and easy to follow for the end user.

    Posted 11 years ago on Wednesday March 6, 2013 | Permalink
  4. There is no way currently to add those quantity fields conditionally inline with the checkboxes, You could do it with jQuery by positioning the quantity inputs right after the checkbox fields but I'm not sure how complex that would be to accomplish.

    Posted 11 years ago on Monday March 11, 2013 | Permalink