What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.

  • Profile Image

    How to disable a field based on the number of answers?

    Asked by pvallet on March 02, 2016 at 04:28 PM

    I would like to create a form with multiple products. Each product can be selected 3 times.

    I would need my user to go on the page and they should be able to select one and only one product BUT once a product has been selected already 3 times by other users who would have filled the form, they cannot be selected anymore so they need to select an other one.

    Is it possible to create this kind of form?

  • Profile Image
    JotForm Support

    Answered by Kevin_G on March 02, 2016 at 06:23 PM

    Take a look on this widget, it could help you to achieve what you need: http://widgets.jotform.com/widget/gift_registry

    Currently it is not possible to do it, if the widget above does not help, you will need to get the source code of your form and add some Javascript codes to disable the option, this guide will help you to get the source code of your form: http://www.jotform.com/help/104-How-to-get-the-Full-Source-Code-of-your-Form. 

    You will also need to save the submitted data in your own database in order to be able to handle it with the Javascript code, this guide will help you to send the data to your database: http://www.jotform.com/help/126-How-to-send-Submissions-to-Your-MySQL-Database-Using-PHP

    Hope this helps.