Hi,
I have a repeat section (its a list that repeats blocks of addresses) to which I am applying a dmx-class to change the font colour to grey if there is no data in the field.
So that in an address where (name, line1, town, county etc.) there is NO text in the database field the font colour is grey (and I enter the field name):
<div class="list some-padding">
<ul is="dmx-repeat" id="del_repeat" dmx-bind:repeat="BritThermPortalApp.main.account.all_address.data.delivery">
<li>
<div class="row">
<div class="col" dmx-text="(company.length() > 1 ? company : 'Company Name')" dmx-class:grey_text="(company.length() < 1)"></div>
</div>
<div class="row">
<div class="col" dmx-text="(line1.length() > 1 ? line1 : 'Address Line 1')" dmx-class:grey_text="(line1.length() < 1)"></div>
</div>
and so on.
The repeat is per address.
My issue is that this formatting is applied correctly on the first address but not on the subsequent address, all text is black.
The fields that should be grey are correctly displaying the template text so the source data seems fine.
Am I missing something?
Thanks in advance.
Paul.
Community Page
Last updated:
Last updated: