Gossamer Forum
Home : Products : DBMan : Customization :

Line Breaks (Nothing to do with textarea)

Quote Reply
Line Breaks (Nothing to do with textarea)
My form uses 6 checkboxes (as well as other things not related to this problem). At least 2 of the boxes will always be checked -- usually 3 or 4.

I'm displaying the results in table format. However, to maintain a consitent look, the data from all these checkboxes must be displayed in one <TD> cell.

The problem is that I want to have a <BR> between each one and I don't want any breaks where there is no data to be displayed. For example, if there is data from checkbox 1, 3 and 5 -- I don't want to end up with extra blank lines between them when displayed.

I think what I want is to have something write in the breaks -- but only when displaying the data and only if there is data to be displayed.

Any suggestions?



Quote Reply
Re: Line Breaks (Nothing to do with textarea) In reply to
Never mind...
I figured it out.
I must have twitched the first time -- causing the error. There's nothing wrong with using....
if ($rec{'data1'}) { print qq| $rec{'data1'}<br> |; }
if ($rec{'data2'}) { print qq| $rec{'data2'}<br> |; }
if ($rec{'data3'}) { print qq| $rec{'data3'}<br> |; }

Thanks anyway,
averick