Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Listings Manager (Realty Manager & Auto Manager):
Suppressing fields with no data

 

 


overboard
Novice

Mar 17, 2009, 8:04 AM

Post #1 of 7 (3336 views)
Shortcut
Suppressing fields with no data Can't Post

Is there a simple way to suppress display of any field label which has no data entered against it?

Thanks

Carolann


dwn11
User

Mar 18, 2009, 1:39 AM

Post #2 of 7 (3314 views)
Shortcut
Re: [overboard] Suppressing fields with no data [In reply to] Can't Post

<script type="text/javascript">
if ('$lfieldX_je$')
{
document.write("Fax: $lfieldX_je$");
}
</script>


overboard
Novice

Mar 18, 2009, 11:11 AM

Post #3 of 7 (3290 views)
Shortcut
Re: [dwn11] Suppressing fields with no data [In reply to] Can't Post

Hmmm.... doesn't work. I don't write javascript but it looks like the code suggested is looking for $lfieldX$ instead of using a wildcard. I tried using an asterisk as a wildcard but no luck.

The code suggested also specifies one label (Fax.) I tried to use a wildcard (asterisk) there too, because I want to suppress all labels where there is no data.



Perhaps I have misunderstood?

Thanks!

C.


dwn11
User

Mar 18, 2009, 2:56 PM

Post #4 of 7 (3270 views)
Shortcut
Re: [overboard] Suppressing fields with no data [In reply to] Can't Post

http://www.interactivetools.com/forum/forum.cgi?post=68812



Copy & paste the code I gave exactly (replacing an existing $lfieldX$ field) and replace the "X" with the field number you're using... and that's it. :)

So, for example, if you wanted to do this with listing field #28, in which you wanted to display a "Fax", you would have this:


Code
   
<script type="text/javascript">
if ('$lfield28_je$')
{
document.write("Fax: $lfield28_je$");
}
</script>


overboard
Novice

Mar 19, 2009, 7:31 AM

Post #5 of 7 (3208 views)
Shortcut
Re: [dwn11] Suppressing fields with no data [In reply to] Can't Post

dwn11,

Thank you for your assistance. I do see that if I were dealing with one particular field label that needed to be suppressed, the script you offered would work well. However my problem is that there are over 35 different fields on the _publish_listing.html layout and many of them don't need to display because there is usually no data in them. So what I need is what you offered, but sort of with a "wildcard" factor that would suppress any of the 35 labels when no data was available.

I'm looking for a generic script that would suppress any labels on the page for which there were no data. I have to think there's a way to do that with a singular script that takes a wildcard approach, rather than have to specify each individual field. However, I don't know javascript so perhaps that isn't even possible.

I feel like I'm getting closer to the answer here, but can't quite accomplish it...

Crazy carolann


Donna
Staff / Moderator


Mar 19, 2009, 12:37 PM

Post #6 of 7 (3188 views)
Shortcut
Re: [overboard] Suppressing fields with no data [In reply to] Can't Post

Hi there,

There's no wildcard -- each field would need to be checked individually. Listing Manager templates are independent from the actual software, so they have no way of knowing if there's content in the field or not. The above javascript solution is the correct one. :)

Donna

--
support@interactivetools.com


overboard
Novice

Mar 23, 2009, 10:55 AM

Post #7 of 7 (3079 views)
Shortcut
Re: [Donna] Suppressing fields with no data [In reply to] Can't Post

OK, Thank you - I'll use the script you have offered. Seems to work well enough.