Cascading drop down and simple drop down not working together.

Aug 20, 2015 at 1:18 PM
Edited Aug 20, 2015 at 1:24 PM
Hi,

I am currently trying to make a help desk on SharePoint 2010. On the whole it has been working fine with some basic cascading drop downs. However after a few users have got confused by the complex boxes, I want to change them to simple drop downs. The code I am using is below. Basically when the user selects the building, the room should only show rooms in that building.
<script type="text/javascript">

  $(document).ready(function (){
             var selects = $('.ms-lookuptypeintextbox');
        if (selects.length > 0) {
        $(selects).each(function(index, value) {
            $().SPServices.SPComplexToSimpleDropdown({
                columnName: $(this).attr('title') 
            }); 
        });
    }

    $().SPServices.SPCascadeDropdowns({
            relationshipList: "Room",
            relationshipListParentColumn: "Building",
            relationshipListChildColumn: "Room",
            parentColumn: "Building",
            childColumn: "Room"
     });
     
  });
</script>
The cascade was working fine before, and if I remove the cascade details, it converts them to simple drop downs with the full list.

When they are both there as above, the Room drop down box will not drop down at all and I cannot select anything at all.

Any help would be great!

Thanks,

Jon
Aug 21, 2015 at 10:16 PM
Instead of first converting them to simple dropdowns and then adding cascading dropdowns, just use the 'simpleChild' input option of the SPCascadingDropdown method. It will do it automatigically.

Paul
-- sent from mobile
Aug 24, 2015 at 12:55 PM
Hi,

Thanks for the reply. I have now got it working as I wanted. Don't know if it was conflicting previously or something, but its spot on now.

Thanks again for your help,

Jon