how can i hide the component in pdf if the value/input is empty
To hide a component in the generated pdf only when it has no value you can use the advanced conditional feature to dynamically hide the component.
The instance.isHtmlRenderMode()
function will return true
for PDF rendering and the instance.getValue()
function will return the value of the component. Combining this into a conditional expression will allow you to hide the component in the PDF if there is no response to it as shown below.
if(instance.isHtmlRenderMode() && !instance.getValue()) show = false
To hide a component in the generated pdf only when it has no value you can use the advanced conditional feature to dynamically hide the component.
The instance.isHtmlRenderMode()
function will return true
for PDF rendering and the instance.getValue()
function will return the value of the component. Combining this into a conditional expression will allow you to hide the component in the PDF if there is no response to it as shown below.
if(instance.isHtmlRenderMode() && !instance.getValue()) show = false