Hiding graphics in between fields if fields are empty

3 posts by 2 authors in: Forums > CMS Builder
Last Post: February 13, 2009   (RSS)

Re: [zaba] Hiding graphics in between fields if fields are empty

By Dave - February 11, 2009

Hi zaba,

You can use a PHP if statement to test if the field has any content and only show the html and rule if there is content in the field. Like this:

<?php if ($record['sub_head_three']): ?>
.. show fields and rule here ...
<?php endif ?>

Try adding the if and endif tags around the content you want shown or hidden and change the fieldname in the if to be the field you want to test.

Let me know if that works for you!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Hiding graphics in between fields if fields are empty

By zaba - February 13, 2009

Aha...
Perfect. Your a genius. Thanks Dave [;)]