Hi,
I'm trying to use [cb:if] statements to show/hide a custom html field if text fields [cb_...] are filled in by users.
So far, I've got:
Code:
<div>
[cb:if cb_suburb="" and cb_state="" and cb_country=""/] [/cb:if]
[cb:if cb_suburb!="" and cb_state="" and cb_country=""/]<i class="fa fa-home fa-lg"></i>1 [cb_suburb][/cb:if]
[cb:if cb_suburb="" and cb_state=!"" and cb_country=""/]<i class="fa fa-home fa-lg"></i>2 [cb_state][/cb:if]
[cb:if cb_suburb="" and cb_state="" and cb_country!=""/]<i class="fa fa-home fa-lg"></i>3 [cb_country][/cb:if]
...
</div>
When the fields are all empty (ie. none have been filled in), this results in a |home| icon with a 2. I've tried it with 2 different custom fields and sets of text input fields and got the same result both times.
Any ideas why this doesn't work or is there a better way to hide the custom html field when the text fields are all empty? As far as I understand, the conditional plugin does not allow for AND statements.
Cheers
David