Skip to main content
Conga Support

Auto-generated Content Data-Show-If/Data-Hide-If Attributes


These attributes allow a user to show or hide blocks of content in a document based on meeting criteria defined in the attribute’s statement.

Syntax: data-show-if="variable_name <operator> 'value'"
variable_name: the Salesforce API name of the field you want to compare.
operator: the method by which you want to compare.  Valid operators are:
              =, !=, >, >=, <, <=, LIKE, NLIKE, IS BLANK, IS NOT BLANK
value: a user-defined value that you use to set up your show/hide criteria

The following example shows the HTML necessary to make a paragraph visible when the Proposal Location contains Los Angeles.  In all other cases, the paragraph will hide.

<p data-show-if="proposal_location LIKE 'Los Angeles'">Show this text if the Proposal Location contains Los Angeles</p>

These attributes can also be used within <span> elements in order to show/hide information within other elements.

Example within a table cell:

<td><span data-show-if="Opportunity_Contract_Term__c == 6">*</span>[PricebookEntry.Product2.Name]</td>

This HTML allows us to show the asterisk only if the Contract Term = 6.

Rendered table cell:

  • Was this article helpful?