No, I understand. If there is name, add, tel, fax, email fields, you want to see:
Name: John Doe
Address: 1234 Cherry Lane
Phone: (800) 555-5555
Fax: (800) 555-5556
Email: jdoe@email.com
If there is only name, tel, email you want to see:
Name: John Doe
Phone: (800) 555-5555
Email: jdoe@email.com
Right?
Here is what you need to do. I don't know what mods you have installed, but the following is from the ORIGINAL html.pl file from dbman.zip.
in
'sub html_record' replace each line with the appropriate code to check if a field is blank. Here is an example of the original code:
Code:
<TR><TD ALIGN="Right" VALIGN="TOP"><$font_color>URL: </FONT></TD>
<TD> <$font><A HREF="$rec{'URL'}">$rec{'URL'}</A></Font></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><$font_color>Type: </FONT></TD>
<TD> <$font>$rec{'Type'}</Font></TD></TR>
Change each <tr><td...</td></tr> line to:
Code:
if ($rec{'URL'}) { print qq|<TR><TD ALIGN="Right" VALIGN="TOP"><$font_color>URL: </FONT></TD>
<TD> <$font><A HREF="$rec{'URL'}">$rec{'URL'}</A></Font></TD></TR>|; }
if ($rec{'Type'}) { print qq|<TR><TD ALIGN="Right" VALIGN="TOP"><$font_color>Type: </FONT></TD>
<TD> <$font>$rec{'Type'}</Font></TD></TR>|; }
Remember to close and open any
print qq| statments before and after these changes. For example:
Code:
print qq| #the opening print to set up static code
<TABLE WIDTH="475" CELLPADDING=0 CELLSPACING=0 BORDER=1 BGCOLOR="#FFFFCC">
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>ID:</FONT></TD>
<TD WIDTH="80%"> <$font>$rec{'ID'}</Font></TD></TR>
|; #close the print qq from above
if ($rec{'URL'}) { print qq|<TR><TD ALIGN="Right" VALIGN="TOP"><$font_color>URL: </FONT></TD>
<TD> <$font><A HREF="$rec{'URL'}">$rec{'URL'}</A></Font></TD></TR>|; }
if ($rec{'Type'}) { print qq|<TR><TD ALIGN="Right" VALIGN="TOP"><$font_color>Type: </FONT></TD>
<TD> <$font>$rec{'Type'}</Font></TD></TR>|; }
print qq| #open print again
<TR><TD ALIGN="Right" VALIGN="TOP"><$font_color>Popular:</FONT></TD>
<TD> <$font>$rec{'Popular'}</Font></TD></TR>
</TABLE>
|; #close print
The above will setup the <table> and always print the Record ID. Then, if there is a 'URL' it will print it, if not it won't. Same for 'Type'. Then it will always print the 'Popular' field, then close the table.
Work with the above to get your desired fields/results. I have a number of mods added such as alternate color for each line, short/long display, and some of my own touch! If you want to see how my results show up, go to:
http://www.thefew.com/...d&view_records=1 AJ