- gcugirl27Asked 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.
- JotForm SupportliyamAnswered 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.
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: http://www.itechies.net/tutorials/jscript/jsexample.php-pid-check-limit.htm
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.
- rblazeAnswered on November 16, 2011 at 08:15 PM
Sorry -- not able to get this working: http://www.fafp.net/2012-ballot/
- JotForm SupportidarktechAnswered on November 16, 2011 at 10:25 PM
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: http://www.itechies.net/tutorials/jscript/jsexample.php-pid-check-limit.htm
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!