hide content if empty text field

2 posts by 2 authors in: Forums > CMS Builder
Last Post: April 4, 2012   (RSS)

Re: [s2smedia] hide content if empty text field

By (Deleted User) - April 4, 2012

Hi s2smedia,

Assuming that the field for 'accomplishments' is titled the same, you could use this:
if (@$record['accomplishments']) { //show accomplishments box}

This will check to see if anything exists in the accomplishments field and, if so, will output whatever you need to output. If not, the errors caused will be suppressed (the '@' symbol does that) and the code will continue as if nothing is wrong.

Let me know if this helps,

Tom