Title: MultiChoice rules
Last modified: June 6, 2018

---

# MultiChoice rules

 *  Resolved [morriscookies](https://wordpress.org/support/users/morriscookies/)
 * (@morriscookies)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/multichoice-rules/)
 * Hi, is there any option to add rules for MultiChoice to make it minimum required
   as one choice and maximum of 3 choice ?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Contributor [Form Maker Support](https://wordpress.org/support/users/formmakersupport/)
 * (@formmakersupport)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/multichoice-rules/#post-10374016)
 * Dear Morris,
 * Please try the following.
 * Add the below mentioned code in **Forms > Form Options > Javascript**
    section
 *     ```
       $(document).ready(function(){
           var limit = 3;
           $('input[type=checkbox]').on('change', function(evt) {
                console.log($("input[type='checkbox']:checked").length);
                if($("input[type='checkbox']:checked").length > limit) {
                     this.checked = false;
                }
           });
       })
       ```
   
 * Please try and provide the feedback.
 * Thanks, have a nice day!
 *  Thread Starter [morriscookies](https://wordpress.org/support/users/morriscookies/)
 * (@morriscookies)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/multichoice-rules/#post-10384922)
 * Hi, the code above doesn’t work, please find below link and code location whether
   is correct not :
 * [https://kaawei.co.uk/diy-cookies/](https://kaawei.co.uk/diy-cookies/)
 * > [View post on imgur.com](https://imgur.com/dYRVhCz)
 * Thanks.
 *  Plugin Contributor [Form Maker Support](https://wordpress.org/support/users/formmakersupport/)
 * (@formmakersupport)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/multichoice-rules/#post-10385695)
 * Hi Morris,
 * Sorry for the inconvinence. Please try to add this code.
 *     ```
       jQuery(document).ready(function(){
          var limit = 3;
          jQuery('#9form_view1 input[type=checkbox]').on('change', function(evt) {
               console.log($("#9form_view1 input[type='checkbox']:checked").length);
               if($("#9form_view1 input[type='checkbox']:checked").length > limit) {
                    this.checked = false;
               }
          });
       })
       ```
   
 * Thanks, have a nice day!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘MultiChoice rules’ is closed to new replies.

 * ![](https://ps.w.org/form-maker/assets/icon-256x256.png?rev=2068681)
 * [Form Maker by 10Web - Mobile-Friendly Drag & Drop Contact Form Builder](https://wordpress.org/plugins/form-maker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/form-maker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/form-maker/)
 * [Active Topics](https://wordpress.org/support/plugin/form-maker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/form-maker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/form-maker/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Form Maker Support](https://wordpress.org/support/users/formmakersupport/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/multichoice-rules/#post-10385695)
 * Status: resolved