Jump to content

rush360

Members
  • Content Count

    3
  • Joined

  • Last visited

Everything posted by rush360

  1. Hi @geoffdude...thank you for the reply. Below is based on what you sent me....alas, on the record I am testing on has a value in the field 'Zip3' the block is still hidden by the following javascript: <script type="text/javascript"> document.addEventListener('DataPageReady', window.onload = function(){ var x = document.querySelector("#EditRecordZip3\\$Anchor").value; if (x == "") { document.getElementById("box1").style.display = 'none'; } else { document.getElementById("box1").style.display = 'block'; } }); </script> -- <style> #box1 {display:block}</style> <div id="box1" style="background:#eee;border:1px solid #ccc;padding:5px 10px;">[@field:Address3_Type]&nbsp;[@field:Verb3]<br /> [@field:Address3_Time@] [@field:Address3_Time*] <hr />Address:<br /> [@field:Address3]<br /> [@field:City3], [@field:State3]<br /> [@field:Country3], [@field:Zip3]</div> Any ideas where I've gone wrong? I also need to conditionally hide three other blocks with this javascript. I assume I need to create #box2, #box3, #box4 for each of the 3 other blocks I want to hide but am unsure of how to add the "boxes" to the script? Many thanks!
  2. I would like to Hide HTML block(s) when the value of one of the fields called in the HTML Block is blank. Below the HTML from one of the blocks. I would like to hide this block if the field Zip3 is blank: <div style="background:#eee;border:1px solid #ccc;padding:5px 10px;">[@field:Address3_Type]<br /> [@field:Address3_Time@]&nbsp;on [@field:Address3_Time*]</div> <div style="background:#eee;border:1px solid #ccc;padding:5px 10px;">Address:<br /> [@field:Address3]<br /> [@field:City3], [@field:State3]<br /> [@field:Country3], [@field:Zip3]</div> I also have 3 other similar HTML Blocks that would be hidden if fields Zip4, Zip5 & Zip6 are blank.
×
×
  • Create New...