Forum


Replies: 2   Views: 1210
Embedhtml: checkboxes with grey background
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by lucaloda  · 11-03-2020 - 20:06

hello,

when i insert a html code with

$docx->embedHtml($text, array('removeLineBreaks'=>true));

and there's a checkbox inside i get a grey background inside the checkbox square.

is there a way to remove it?

Posted by admin  · 12-03-2020 - 10:07

Hello,

That's how FORMCHECKBOX fields are added as default. To remove grey backgrounds from legacy forms please check doNotShadeFormData available in docxSettings (https://www.phpdocx.com/api-documentation/layout-and-general/set-Word-settings). Please note that the support of this setting may change in some DOCX readers.

Premium licenses can also use HTML Extended to prevent adding that grey background using phpdocx_simplefield tag and the doNotShadeFormData attribute.

Regards.

Posted by lucaloda  · 12-03-2020 - 15:54

thank you