In this article, we will see how to implement a cascading dropdown in the SharePoint list using SP services.
What’s cascading dropdown?
The selection of the parent dropdown list causes a child drop down list to be populated with related items to the parent.
The following steps to create cascading drop down list
Step 1 : First, we need to create lists that we need.
Create a list called “TripZone”
Click Site contents
Select New -> List and click on it .
Named the list “TripZone”
The first list has only the TripZone information (contains only one column) and finally the list is like below.
We need to follow the above steps to create a second list (Area). This list contains two columns and one of the columns we added as a lookup field (TripZone)
Now, create a third list named “Trips” like above. This list contains two lookup columns.
TripZone – Get Tripzone information from Tripzone list and select Title as the source code of the column
Then, add the second lookup, Get area from information form Area list, as per the screenshot below.
The list is called “Trips” and looks like the below screenshot.
Step 2 :
Go to -> Trips list -> Under list tab -> Select -> “Default New Form”
Add “Script editor” into the form
Click on Edit snippet
Step 3 :
Add the below code.
Click ok and test the functionality. It will start working.
When you select the TripZone as “Vayalur”, it will fetch the areas related to Vayalur