Cascading Lookup using JQuery in SharePoint 2010

Procedure

Step 1

Create list namely State , in default column Title add list of States.eg. MH,MP,UP etc.

Step 2

Create 2nd list namely City, create lookup column State on State list, add city names in Title column relevant to states.

Step 3

Create 3rd list where you want to use this relation, here my list name is RRF , in RRF list 1st default column is their and create two more column first is state lookup on State list, 2nd is city column lookup on City list.

See all items of State and City list get binds to 3rd list RRF, now we need to establish cascading relation.

Step 4

Open 3rd RRF lists newform.aspx page in sharepoint designer and add fallowing lines of code below script tag.
  1. <script type="text/javascript" src="../../Style Library/Js/jquery-2.1.1.min/jquery-2.1.1.min.js"></script>   
  2. <script type="text/javascript" src="../../Style Library/Js/jquery.SPServices-2014.01/jquery.SPServices-2014.02ALPHA7.js"></script>   
  3. <script type="text/javascript">  
  4.     $(document).ready(function () {  
  5.         $().SPServices.SPCascadeDropdowns({  
  6.             relationshipList: "City",  
  7.             relationshipListParentColumn: "State",  
  8.             relationshipListChildColumn: "Title",  
  9.             parentColumn: "state",  
  10.             childColumn: "city",  
  11.             debug: true  
  12.         });  
  13.     });  
  14. </script>  
Refresh page and see result....

REF New item

NOTE: Use latest JQuery version ie. JQuery.SPServices-2014.02ALPHA7.js because in previous versions can not support for required fields.
Ebook Download
View all
Learn
View all