For Cascading Drop down, first of all we need to refer two scripts as shown in the code and also need to store that files at the proper path in Sharepoint Site content or in any other library.
If we need to put the cascading dropdown in the List forms, we need to put the below code at the relative NewForm.aspx and EditForm,aspx in the ListForms and put the below code at the "PlaceHolderAdditionalPageHead" .
<asp:Content ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server">
<script language="javascript" type="text/javascript" src="../../JSLibrary/jquery-1.7.2.min.js"></script>
<script language="javascript" type="text/javascript" src="../../JSLibrary/jquery.SPServices-0.7.1a.min.js"></script>
$(document).ready(function() {
$().SPServices.SPCascadeDropdowns({
relationshipList: "Facilities",
relationshipListParentColumn: "Process",
relationshipListChildColumn: "Title",
parentColumn: "Process",
childColumn: "FacilityName",
promptText: "Choose Facility...",
debug: true
});
});
</script>
</asp:content>
No comments:
Post a Comment