Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Re: [johnb] Hide blank fields

Quote Reply
Re: [johnb] Hide blank fields In reply to
Hi,

I think you are looking for the following kind of conditionals that can be inserted directly into your record.html page.

<%if field_1%><%field_1%><%endif%> (this will only print field_1 if it has a value)

<%if field_1%><%field_1%><%else%>do something<%endif%> (this will print field_1 if it has a value or do something else if it doesn't)

<%if field_1 and field_2%>do something<%endif%> (this will do something if BOTH field_1 AND field_2 have values)

<%if field_1 or field_2%>do something<%endif%> (this will do something if EITHER field_1 OR field_2 has a value)

You can also use the following to test the value of the field.

<%if field_1 eq 'value'%><%field_1%><%endif%> (this will only print field_1 if it EQUALS the value)

For more detailed information -

Go to your DBManSQL Admin and click on the "Help" link on the top right of the page.
Click on the "GT Module Documentation" link second from the bottom on the left.
Scroll down to and click on the "Template" link in the left frame.
I suggest you read all of that page but in particular you are looking for the "Conditionals"
section.

Hope this helps.

Simon.
Subject Author Views Date
Thread Hide blank fields johnb 3808 Feb 8, 2003, 5:43 AM
Thread Re: [johnb] Hide blank fields
jai 3648 Feb 8, 2003, 4:56 PM
Post Re: [jai] Hide blank fields
johnb 3631 Feb 10, 2003, 12:57 AM