Checkbox Form Field Data
Question asked by Ryan Cavanaugh - 9/27/2022 at 9:13 AM
We have a word document with checkbox form fields that show as checked when viewing the physical file but when viewing the document through the Document Viewer Control, the checkboxes do not show as checked. This is happening following a method call that is replacing string text in the document. Before the replacement the checkboxes show as checked in the Document Viewer Control but do not show as checked after the replacement. Is there some metadata associated with the checkbox form field control that the Document Viewer Control is referencing to determine if the checkbox should be shown as checked? And the replacement method is somehow altering the checkbox's metadata causing the issue?

1 Reply

Reply to Thread
Ryan Cavanaugh Replied
From examining the Word document's XML, we have found the issue. When the checkbox's value is represented as '1' in XML, it displays as checked in the Document Viewer. However, if the checkbox's value is represented as 'true' in the XML, it does not display as checked in the Document Viewer. According to the XML specification, both of these values are valid, but it appears the Document Viewer is only handling the '1' value, not the 'true' value.

Reply to Thread