Forum


Replies: 1   Views: 153
How to remove textbox
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 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.