Conditional not showing in live preview

Good day.

I added a conditional statement to a div in my designer. The condition is working fine when I preview the page in the designer, however when I preview the HTML in browser the condition does not work. Same for the live preview in Connect Designer.

Here is my JavaScript:

if (record.fields[“Hour_Count_24”] == 0) {
results.attr(“data-conditional”, “”);
results.show();
} else {
results.hide();
}

Any feedback would be appreciated. Thanks

Works well here, in Designer as well as in live preview or in workflow.

So you should check your data or maybe the way you’ve added that condition.

I think I’ve checked about everything I can. I even set the condition to be 1 == 1 and still no dice.

As for adding it, I did it through the GUI by right clicking and choosing “Make Conditional”

Difficult to say where the issue is without having the template.

Best try with a new simple template from scratch or with print context if it’s reproducible.

Using the latest version 1.5?