Show / Hide fields based on a dropdown selection using SPUtility.js

In this article, I’ll explain How to show and hide fields based on a Choice field selection in ‘New Form’, ‘Edit Form’ and ‘Display Form’ in SharePoint 2013 / 2016 via SPUtility.js?

Prerequisites:

  • Download SPUtility.js.
  • Upload the downloaded file (SPUtility.js) to an appropriate place in SharePoint Site like ‘Style Library’.
  • Create a Custom list.
    • Add a choice field displayed as ‘Drop-Down Menu‘.
    • Fill your choices as you need.
    • Add the fields that you need to show or hide based on the selected value of choice field.

Steps:

Continue reading “Show / Hide fields based on a dropdown selection using SPUtility.js”

Advertisements

Show / Hide a DIV tag based on a user group in SharePoint via SPServices

In this hint, I’ll elaborate How to show/hide a DIV tag based on a user existence in a specific group with a specific permission in SharePoint via SPServices?Show Hide DIV tag based on user group in SharePoint via SPServicesScenario:

Consider you have a SharePoint Page that holds a 2 Script Editor Web Part or more, and each Script Editor Web Part has its independent DIV as shown below.Show or Hide a DIV tag based on a user group in SharePoint via SPServicesNow, you need to hide the left (DIV) with ‘< div id="ID1"> Qassas div ID1< /div > from all users who belong to a specific SharePoint Group in your SharePoint site.

Steps: Continue reading “Show / Hide a DIV tag based on a user group in SharePoint via SPServices”

Conditional Formating in SharePoint Display Form via JQuery

In this hint, I’ll show How to apply a Conditional Formating in the Display Form based on a specific field value via jquery?

Scenario:

I have a SharePoint list field called ‘Status’, I need to apply a conditional formatting on its row based on its value in the ‘Display Form‘ as the below condition.

  • If (Status == “In progress”) then set the background color row to green.
  • Else set background color row to red.change-background-row-color-in-sharepoint-display-form

Steps: Continue reading “Conditional Formating in SharePoint Display Form via JQuery”

SharePoint page redirect If the current user belong to a specific group via JQuery SPServices

I have a web application ” http://epm/ ” with a site collection PWA,I only need If the current user belongs to a specific SharePoint group go directly to “http://epm/pwa/&#8221; when he tries to browse the root URL “http://epm/&#8221;

Steps:
Continue reading “SharePoint page redirect If the current user belong to a specific group via JQuery SPServices”

Load FancyBox popup only once per session when browse SharePoint site

In this article, I will elaborate How to show a fancybox popup in SharePoint.

  • In my Scenario:
    • I need to show a fancybox popup window only once per session when I open a SharePoint site for the first time.

I  checked the type of modal popup and found the FancyBox is fantastic popup that meet my requirement.

The Output should be look like the following

AD

Steps:
Continue reading “Load FancyBox popup only once per session when browse SharePoint site”