Forum


Replies: 1   Views: 97
How to remove textbox

Posted by fairshareitservices  · 25-07-2024 - 10:26

I have doc template which has textbox and inside text box it has table and text. Now when there is no data for the table and text both get removed. But in the generated document textbox remains as is. So how to remove the textbox if it is empty

Posted by admin  · 25-07-2024 - 11:12

Hello,

You can use removeWordContent to remove elements in a DOCX.
As the textbox is not a supported type, you need to use a custom query (customQuery option) to remove it.

If you open a support ticket (https://www.phpdocx.com/support) with a DOCX template sample, we'll generate a custom code using it.

Regards.