
thp
User
Jan 21, 2009, 5:39 AM
Post #4 of 10
(5571 views)
Shortcut
|
|
Re: [Donna] Hide unused fields in detailed listing
[In reply to]
|
Can't Post
|
|
Donna, I have used the code and it works great. However! In my _search_results page, I want the telephone number to be shown from one of two fields. If the property is a Private Sale (Created as a User), then against the property I have created a text field (lfield3)for a private telephone number. Therefore, in the seach results page, if this field has been entered, then it is to show the value. The system is processing this as it should with the following code; <script type="text/javascript"> if ('$lfield3_je$') { document.write("Telephone $lfield3_je$"); } </script> However, If the property is being sold by an Agent, then I want the telephone number to be taken from the Agents Homepage details (in which case the telephone field in the Listing Editor will be blank). The telephone field is hfield5 in the Homepage Editor. Therefore, in the seach results page, if this field has been entered, then it is to show the value. Therefore, underneath the above javascript, I have inserted the following code; <script type="text/javascript"> if ('$hfield5_je$') { document.write("Telephone $hfield5_je$"); } </script> The system is not displaying this field, even though, the field has an entry agianst it. I have tredble checked everything i.e. correct field numbers etc but can't seem to fathom it out. Any ideas would be much appreciated?
|