Jump to content
  • 0

Hiding an empty field.


Question

Hi Gurus, 
I have this business directory working in Wordpress + Avada Theme. Now we are moving to DIVI theme and some things are not working. I have this tabular report that shows all the offices for the specific company that was select. In the "Search and Report Wizard - Configure Results Page Fields" part I have this javascript to hide the fields that are blank:

<script>
if("[@field:Address]".length > 0){
document.write('<strong>Address:</strong> [@field:Address]<br />')
}
if("[@field:City]".length > 0){
document.write('<strong>City:</strong> [@field:City] ')
}
if("[@field:State]".length > 0){
document.write('<strong>State:</strong> [@field:State] ')
}
if("[@field:ZIP]".length > 0){
document.write('<strong>ZIP:</strong> [@field:ZIP]<br />')
}
if("[@field:Country]".length > 0){
document.write('<strong>Country:</strong> [@field:Country]')
}
</script>

it works very nice in AVADA:
image.thumb.png.9fec23f104cdb9f7d53f5edf634f38f6.png

 but it's not working in DIVI: 

image.png.23b083a9f407be880079341376175247.png


I also tried also this technique: 

but no success again.

Can someone help? 
thank you very much for any clues. 

Link to post
Share on other sites

2 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...