Manage Learn to apply best practices and optimize your operations.

When you can't deselect a checkbox item on the Web...

Fix for issue where cannot uncheck (deselect) a checkbox item on the Web.


You cannot uncheck (deselect) a checked item in a Checkbox field when updating a Notes document via a Web browser. The checkbox item will remain checked the next time you open the document.

The core problem is the way HTML form data is returned to the Domino server upon a submit. When you submit an HTML form, the name-value pairs of all the fields are assembled and sent to the Domino server. For Checkbox fields, the Web browser will only send the "checked" values. So if an item is not checked for a Checkbox field, no information for that checkbox item is sent to the Domino server. Therefore, Domino does not know to remove that item from the Notes field when the document is saved.


Force the unchecked items in the Checkbox field to be sent to the server by setting the items as checked and the value to null at the time the document is submitted to the Domino server.

Code Sample:

Following is a sample of the code we use to force unchecked checkbox items to be passed to the Domino server when a document is submitted via a Web browser. This solution works for both single item and multiple item Checkbox fields. The only issue I can see is that, for a multiple item Checkbox field, a "Text List" type of field is always generated for the Notes field, with a null value for each unchecked item in the selection list. This is contrary to the Notes interface which generates a plain "Text" field with a null value if no items are checked for a multiple item Checkbox field or a "Text List" type of field with only the checked values listed.

1. A "Save & Close" action is used on the form for the user to submit a new or updated document via a Web browser; we do not use the "onSubmit" form event. The "Save & Close" action has the following JavaScript code:

if (validateFormFields()) 

2. The following code is in the "JS Header" event for the form:

var thisform = window.document.forms[0];
// Function to validate the fields on this form 
function validateFormFields() 
   if (validateFieldRqrd(thisform.Subject, "text", "Action Item Title")); else return false; 
   if (validateFieldRqrd(thisform.Status, "select", "Action Item Status")); else return false; 
   .... all other field validations go here ... 
   // Force null values to be returned back the Domino server (from the Web) 
   // for any unchecked items in the Checkbox fields 
    return true; 
   // End of Function: validateFormFields function 

   // This function forces a null value back to the Domino server 
   // for each unchecked selection item in a Checkbox field. 
   // Notes: 
   // -- This function can only be called at the point where the  
   //     document will be submitted to the server; that is that all 
   //     validations have passed and the last action is to submit it. 
   //     It may cause data entry problems if the user is returned back 
   //     to the form after this function has been run. 
   // -- This function must only be used when submitting  
   //     documents from the Web.    

var index;

    // Test for a multiple item selection list 
   if (objField[0]) 
      // Loop through multiple item selection list 
      for (index = 0; index < objField.length; ++index) 
         if (objField[index].checked == false) 
            objField[index].checked = true; 
            objField[index].value = ""; 
      // Single item selection list 
      if (objField.checked == false) 
         objField.checked = true; 
         objField.value = ""; 
   // End of Function: forceUncheckedItem

Dig Deeper on Domino Resources - Part 6

  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/ community. These cheat ...