Skip to main content

SetCheckBoxChecked

Sets the checkbox value for the content control. This method updates the checkbox state of the content control to either checked or unchecked.

Syntax

expression.SetCheckBoxChecked(isChecked);

expression - A variable that represents a ApiInlineLvlSdt class.

Parameters

NameRequired/OptionalData typeDefaultDescription
isCheckedRequiredbooleanThe state to set for the checkbox. true for checked, false for unchecked.

Returns

boolean

Example

Set the checkbox value of an inline content control in a document.

// How do I set check box checked in a document?

// Set check box checked using an inline content control object in a document.

let doc = Api.GetDocument();
let inlineControl = doc.AddCheckBoxContentControl();
inlineControl.SetCheckBoxChecked(true);