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
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
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.