XML API - pdx:parseCheckboxes


Ticks or unticks a checkbox in a Word template.


You are reading the XML API documentation. For the PHP API method please go to parseCheckboxes.


Element definition

This element allows to modify the state of all the checkboxes of a given Word document.

It allows the modification of:

  • legacy checkboxes
  • Word 2010 checkboxes

The checkboxes are parsed sequentally, as they show in the Word document, and their final state is defined by the $checkboxes array of 0's and 1's (unchecked or checked respectively).

If the length of the $checkboxes array is shorter than the total number of checkboxes the "extra" one will be ignored and left in their current state.

Attributes and sub-elements


The path to the Word document that you want to parse.


The path to the resulting Word document.


Possible values: 1 (tick) or 0 (untick).

In principle, this should have as many entries as checkboxes in the Word document. If there are less the last checkboxes will be ignored and if there are more the extra values will be ignored.

Code samples

Example #1




PHP code

The resulting Word document looks like: