I am trying to format an address using bindings from a database. I have two address fields but most of the 2nd address fields are empty. I want to only show the 2nd address field if it is not empty. I know how to do this in PHP and I know this is probably really easy in Wappler, but I haven’t been able to find the answer. My line of code is:
For each part of the address to be on a separate line, won’t you need to add <br> tags - and then wrap div tags around the span and put the dmx-show=" inside the div?
I’m probably missing something - or perhaps there’s a better solution. Eg in PHP I often use a function using preg_replace and a regular expression to strip out blank lines from blocks of text (like addresses). I wonder if it would be possible to use Wappler’s formatter to create similar functionality.