How do I do cascading dropdowns on editform.aspx? RRS feed

  • Question

  • I have it working on newform.aspx, now I need to get it working on the edit form.  Any tips/code ;-)

    Wednesday, September 5, 2012 8:52 PM


All replies

  • If you have it working on a newform.aspx, can you not implement the same on editform? Sorry, I'm not sure what's the problem? Can you explain more? How did you implement it in the newform? BTW, what version of SharePoint are you working with?


    Thursday, September 6, 2012 2:11 AM
  • I think Parvez has the right idea.  If you've edited your newform via SPServices or some other JQuery trickery, than adding the same code to the EditForm (or a copy of it) should work fine.

    Can you advise what problems you're running into?

    Steven Andrews | SharePoint Professional | http://www.twitter.com/backpackerd00d | https://baron72.wordpress.com/

    Thursday, September 6, 2012 11:52 AM
  • I used the code below to get it working on the new form:

    <script language="javascript" type="text/javascript" src="http://sharepoint.ba.ssa.gov/dco/vhelpdesk/jquerylibraries/jquery-1.3.2.min.js"></script>
    <script language="javascript" type="text/javascript" src="http://sharepoint.ba.ssa.gov/dco/vhelpdesk/jquerylibraries/jquery.SPServices-0.5.6.min.js"></script>
    <script language="javascript" type="text/javascript">
    $(document).ready(function() {
    relationshipList: "SubTopic",
    relationshipListParentColumn: "Primary",
    relationshipListChildColumn: "Title",
    parentColumn: "Primary topic",
    childColumn: "Sub topic",
    debug: true


    Everything works, on new Form because nothing is selected.  When I put this in the CWEP on the edit form it empties all the pre-selected fields out -- like we were starting from scratch.  There are no error messages, but I don't want it to empty out the fields; I want the selections to already be there.  I realize this is a multi-select control, but that isn't the issue.  It's like there is a body onload event firing and emptying out the fields. 


    Thursday, September 6, 2012 2:48 PM
  • Oh, see above reply.  I am using SP 2007 :-(



    Thursday, September 6, 2012 2:53 PM
  • Penny,

    I've used Cascaded dropdown using SPServices, although not with multi-select fields. Just took a quick glance at your code and it seems you're using old version of both jQuery AND SPServices. You might want to try using the latest stable version and see if you still have problem.



    Friday, September 7, 2012 12:48 AM