Hello,
There's no option to set a custom ID to checkboxes. Also note MS Word removes extra informations added to XML contents that are not included in the OOXML specification.
The best approach would be adding bookmarks with custom names:
$checkboxFragmentA = new WordFragment($docx);
$checkboxFragmentA->addBookmark(array('type' => 'start', 'name' => 'bookmark_a'));
$checkboxFragmentA->addFormElement('checkbox', array('fontSize' => 11, 'defaultValue' => true));
$checkboxFragmentA->addBookmark(array('type' => 'end', 'name' => 'bookmark_a'));
$checkboxFragmentB = new WordFragment($docx);
$checkboxFragmentB->addBookmark(array('type' => 'start', 'name' => 'bookmark_b'));
$checkboxFragmentB->addFormElement('checkbox', array('fontSize' => 11, 'defaultValue' => false));
$checkboxFragmentB->addBookmark(array('type' => 'end', 'name' => 'bookmark_b'));
so you can parse the checkbox next to each bookmark in the XML content and also the HTML output. Also note that in addition to the custom bookmark, the addFormElement method adds another bookmark automatically with its own internal id and name (the internal options of this automatic bookmark can't be customized).
Regards.