Introduction

In this article we will learn how to implement Cascading Drop-Down List in SharePoint 2010 List using jQuery and Sp services.

For Implementing Cascading Drop-Down List in SharePoint 2010 List using jQuery and Sp services follow below steps:-

Object

  • Create Country custom list

onject

  • Create State Custom list: with Country lookup column

Create State Custom list

Look up Column Setting

State List

state list

  • Create CascadeDropDownList with Country, State lookup columns
  • Select Default New Form under List tab of newly created List CascadeDropDownList

/CascadeDropDownList

Format Text Tab

  1. <script language="javascript" src="/JSLibrary/jquery-1.4.2.min.js" type="text/javascript"></script><script language="javascript" src="/JSLibrary/jquery.SPServices-0.5.7.min.js" type="text/javascript"></script><script type="text/javascript">
  2. $(document).ready(function() {
  3. $().SPServices.SPCascadeDropdowns({
  4. relationshipList: "State",
  5. relationshipListParentColumn: "Country",
  6. relationshipListChildColumn: "Title",
  7. relationshipListSortColumn: "ID",
  8. parentColumn: "Country",
  9. childColumn: "State",
  10. promptText: "Choose State...",
  11. debug: true
  12. });
  13. });
  14. </script>

HTML Editor

Summary: - In some scenario we need to implement cascading type of concept in OOB forms as for example by selecting Countries respective states or cities. It's not easier in SharePoint.