Skip Ribbon Commands
Skip to main content

Erin Glenn's Blog


Erin Glenn's Blog > Posts > Default a Selection on a Multi Choice Check Box Control on a Nintex Form
August 10
Default a Selection on a Multi Choice Check Box Control on a Nintex Form

​I have a Nintex form (SharePoint 2010 / Nintex Forms 2010) with a Choice Control that has a lookup to another list.  This control is set to have a display format of check boxes (mulitple-selection).  I want the first selection to be checked by default when a new form is opened.

I am not a JavaScript expert, but I am very good at copying code and pretty decent at figuring it out.  I found a forum post that had the answer to my question.

Here are the steps:

  1. In the Choice Control settings, make sure that the Display format is set to Check boxes (Multiple-Selection).


  2. In the Advanced section, set Store Client ID in JavaScript variable to Yes.

  3. After this is set to "Yes", the Client ID JavaScript variable name field appears.  


  4. In this field, enter a variable name.  This name will be used in the JavaScript code that you will enter into the Form Settings.  (I like to prefix all variables with "var".)

  5. Click Save.

  6. From the Nintex Forms toolbar, click Settings.

  7. Expand the Custom JavaScript section and enter the following code:


    NWF$(document).ready(function() {
    NWF$("#" + varIssue).val('1');
    } );

  8. Change "varIssue" to your variable name that you entered in Step 4.  (If you want a different checkbox selected other than the first, change the number "1" in "val('1')" to a different number.  The number represents the list order of the options.)

  9. Click Save.

  10. Preview your form.

  11. The box has a check!



There are no comments for this post.