Skip to main content

Cascading Drop-down in SharePoint 2013

Cascading drop-down to NewForm.aspx  using OOTB .

You can also use the example to create 3 level cascading drop-down and as instructed download 2 jquery files and store them in SharePoint library. Then follow the steps.

Two jquery files to be downloaded are jquery-1.3.2.min.js by jquery.com and jquery.SPServices-0.6.2.zip in codeplex by Mark D. Anderson..

1.       Create List 1: PrimaryDomain

2.       Create List2 : SecondaryDomain and create a column name it continent (could be lookup to Primary domain list or single line of text)
  3.       Create List 3: SubDomain and Create a column name it Secondarydomian (could be lookup to county list or single line of test)
Create 3 columns in list 4.
1.       PrimaryDomain : Lookup to title of PrimaryDomain List
2.       SecondaryDomain: lookup to title of SecondaryDomain List
3.       SubDomain: Lookup to title of SubDomain List

Add the following code as in new.aspx and edit.aspx of list 4 using SharePoint Designer as instructed


script language="javascript" type="text/javascript" src="/sites/EA/Style Library/Scripts/Jquery/jquery-1.10.2.min.js"  /script
script language="javascript" type="text/javascript" src="/sites/EA/Style Library/Scripts/jquery.SPServices-0.7.0.min.js" /script

script language="javascript" type="text/javascript">
 $(document).ready(function() {
 $().SPServices.SPCascadeDropdowns({
 relationshipList: "Cities",
 relationshipListParentColumn: "Country",
 relationshipListChildColumn: "Title",
 relationshipListSortColumn: "Title",
 parentColumn: "Country",
 childColumn: "City",
 debug: true
 });
$().SPServices.SPCascadeDropdowns({
 relationshipList: "Hotels",
 relationshipListParentColumn: "City",
 relationshipListChildColumn: "Title",
 parentColumn: "City",
 childColumn: "Hotel",
 debug: true
 });
});
/script

Comments

Popular posts from this blog

Ghosting and Unghosting

Ghosting means process of requesting an uncustomized page instance by using a page template loaded into memory from the file system of the front-end Web server. These Ghosted pages are pulled from the cache at runtime and therefore it will increase the scalability from the system. All uncustomized pages are reused across all the sites and there is no unnecessary data storage or retrieval. Ghosting eliminates the need to transfer the contents of a page definition file from the SQL Server computer with the content database to the front-end Web server computer For example, the default home page is a ghosted page. Any web part pages created via New Web Part Page user interface also ghosted. Unghosting means that the site has been customized. When you customize a site in SharePoint Designer, or you add custom fields to a Document Library, or create sites using that template; then the changes that you made are stored in the database as a difference and that is referred to as Unghost...