Is it possible to limit the amount of options someone can check using the check boxes?

  • Profile Image
    Asked on October 16, 2011 at 09:26 PM

    I would like to limit the number of options someone can check using the check boxes. Like they can only select 25 out of the 50 options.

  • Profile Image
    Answered on October 17, 2011 at 12:01 AM

    It is unfortunate that this feature is not yet included within JotForm's features.  Fortunately, there is a script available on the web that you can use.

    But this means that you cannot use the script embed or iframe features for embedding your forms on your web pages.  The only option that you can have is place the source code of your form on your own web page since JotForm does not allow placing javascripts inside the form.

    To place the form on your own web page:

    1. Edit your form
    2. Click Embed Form
    3. An Embed form wizard will appear, select Source

    4. Copy the code on the next slide and paste it on your own web page.

    After copying the form source code on your web page, you can add the script that I found on this URL:

    If you have followed the instructions properly, you will have a result similar to this sample form.  In my sample form, I have set my checkbox to be limited to two selections only.

    If you need further assistance, please let us know.

  • Profile Image
    Answered on November 16, 2011 at 08:15 PM

    Sorry -- not able to get this working:

    Any ideas?

  • Profile Image
    Answered on November 16, 2011 at 10:25 PM

    Hi Rblaze,

    I have checked your checkbox limit code and found something wrong in the code that is causing the conditions not to work, please check my screen below:

    Please try to replace the highlighted code with this: if (x>=max_count && !clickedData[t]) or you can paste the whole code again given by this link:

    You can test the result  here. (I have copied your site, sorry about that. I will remove the site after the test :) )

    Let us know if that helps or not. Thank you for using JotForm and have a great day!