Resources > Troubleshooting Tips > Troubleshooting: Output Documents > Image Not Displaying for the Checkbox Field
Image Not Displaying for the Checkbox Field
Perform the following steps to display an image for the checkbox field in Smart Docs:
1. Create two images to depict the picture of checkbox in checked and unchecked respectively.
2. Refer to this section to know how to upload image files and how to access the uploaded image files in Template Designer.
3. Use the following syntax in Template Designer for the required checkbox:
<td>


<img src="" svmx-data="{{$F.IMAGE($F.IF($F.FORMAT('{0}',fieldname) == 'true', 'checkbox_checked', 'checkbox_


unchecked'))}}" />
<p style="display:none;">
{{fieldname}}
</p>
</td>
For the value of the checkbox field to be considered consistently, the field must be referenced at least once outside of the IMAGE function. For this purpose, the code &lt;p style="display:none;" {{fieldname}}&lt;/p is included in the syntax. If it is not included, the image might not be displayed at times, and a blank image outline or blank space might be displayed instead.
For example, to display 'Customer Down' value with a checkbox image in Output Documents, use the following syntax:
<td>

<img src="" svmx-data="{{$F.IMAGE($F.IF($F.FORMAT('{0}',$D.Work_Order.SVMXC__Customer_Down__c) == 'true',

'checkbox_checked', 'checkbox_unchecked'))}}" />

<p style="display:none;">
{{$D.Work_Order.SVMXC__Customer_Down__c}}
</p>

</td>
If you are using this template in mobile devices such as in the iPad app, the IMAGE function does not automatically download the mentioned image files to the device. So, the following code should be added to the template, to enable the downloading of image files:
<p style="display:none;">


<img src="" svmx-data="{{$F.IMAGE('checkbox_checked')}}" />
</p>


<p style="display:none;">


<img src="" svmx-data="{{$F.IMAGE('checkbox_unchecked')}}" />
</p>
Was this helpful?