- Happy Valley SD
- Hide content for missing url in custom minibase
Tips & Tricks
Page Navigation
- Changing a Favicon
- Teacher Section URL for Staff Directory
- Twitter Widget
- Page or Section Navigation
- Expanding/Contracting Embed Code
- Hide content for missing url in custom minibase
- Hiding the Photo Gallery Frame
- Hide search boxes for Staff Directory app
- Can't find the signin button to WCM
- Fix for Staff Directory Search button color
- Search Again button for minibase
- YouTube Codes
- Table App - word wrap code
- Hide Google Calendar sync event details (contact and url)
Hide text or icon if there is no content in a minibase field
-
In the Staff Directory on my training site, I am using an image of the world that links to each person's website. For Jack Harkness, I did not enter a URL for his website field. The world image still displays, but it doesn't link to anywhere, so it just refreshes the page. This can be confusing for the end-user.If you are doing a Custom View MiniBase and you use an image or word as a hyperlink, there are two options to hide the image or word when a record's field has been left blank:
Option 1
Add "style="display: none into the record’s field you wish to hide.In this example, Martha Jones is missing the world icon because I entered "style="display: none for her record's website field. If I had left the website field blank or entered a URL, the world icon would have displayed.Option 2
Alter the Custom View's HTML in 2 steps:1. Add the following code at the bottom of the HTML window:<script type="text/javascript">
$('.X').hide();
</script>2. Adjust the <div> tag for each field that you want to hide to <div class="X$FIELD#>In this example, the word Website does not display for the records that have blank Website fields.The Left image is of the end-user view and the right image is of the HTML code.- Holly Vaughn