Hello,
Hello I am using PHPDOCX advanced version 14.I have been trying to add a checkbox background color as white, i have used both the bgColor as well as tried to color option. The bgColor keeps the background as grey, the color makes the border white but still keeps the background grey. See below my code as well as the output
$wordFragment = new WordFragment($docx);
$checkboxOptions = array(
'fontSize' => 8,
'defaultValue' => !empty($p['findings_detail']['environmentalLiensFound']),
'backgroundColor' => 'FFFFFF'
);
$wordFragment->addFormElement('checkbox', $checkboxOptions);
$docx->replaceVariableByWordFragment(array(
'env_found' => $wordFragment,
'env_found_detail' => $wordFragment
),
array('type' => 'inline', 'firstMatch' => 'true'));
Output: https://pasteboard.co/pWiaEO1UagqH.png
Also, is there anyway to make the checkboxes windings character 254 like a tickmark instead of an 'X'
Thanks
Karthik