SPCascadeDropdowns not saving one field

Jul 25, 2014 at 4:49 PM
Edited Aug 4, 2014 at 2:53 PM
Hi,

We have an edit form where we use 3 cascading drop-downs. Level type filters Zone, Zone filters Section, and Section filters Artifact. All works perfectly and filtering works as expected - except after saving the form we find that the value for artifact has not saved.

If I remove the last call to SPCascadeDropdowns below, then artifact is not filtered by section, but artifact saves successfully. If I then add the last call back and edit the item again, Artifact is blank upon opening the edit form.

I have seen similar issues where parent/child values were configured incorrectly or specified values were not valid for some reason. However these usually resulted in an unexpected error. I get no error in the browser (or console); the artifact data simply does not save.

Any thoughts?

Jquery 1.7.1 and SPServices-2014.01...
EDIT: Just tried with Jquery 1.11.1; same behavior.

Thanks!
$(document).ready(function() {
  $().SPServices.SPCascadeDropdowns({
   relationshipList: "XX Zone",
   relationshipListParentColumn: "LType",
   relationshipListChildColumn: "Title",
   parentColumn: "Level Type",
   childColumn: "XX Zone",
   simpleChild: true,
   debug: true
  });
 

  $().SPServices.SPCascadeDropdowns({
   relationshipList: "XX Section",
   relationshipListParentColumn: "Zone0",
   relationshipListChildColumn: "Title",
   parentColumn: "XX Zone",
   childColumn: "XX Section",
   simpleChild: true,
   debug: true
  });

  $().SPServices.SPCascadeDropdowns({
   relationshipList: "XX Artifact",
   relationshipListParentColumn: "XX_x0020_Section",
   relationshipListChildColumn: "Title",
   parentColumn: "XX Section",
   childColumn: "XX Artifact",
   simpleChild: true,
   debug: true
  });

});
Aug 1, 2014 at 2:02 PM
Still haven't been able to resolve this. Any help out there?
Aug 1, 2014 at 4:30 PM
Looks like same situation as mine. I am waiting on someone to reply. I will let you know if I find a solution for this. I know it's frustrating.
Aug 1, 2014 at 5:26 PM
Does your child column source include more than 20 items? If so, the "simpleChild" option set to true in this function inserts a <select> tag just above the native <input> tag it is related to then hides the original <input> tag. It also assigns a trigger to the new <select> tag to have it update the original <input> tag to the proper value. The value stored in the list when you save the record is whatever is truly in the <input> tag--not what is in your <select> tag. If everything is working as advertised, the <input> element will update each time you change the <select> option. However, it sounds to me like you may have a trigger not firing properly.

You can unhide the original <input> element on the edit form using the debugger console after the form loads. Then you can see if the value is changing when you change the <select> option above it. If the value isn't changing, try setting the "simpleChild" option to false and see if it changes your results.

Geoff
Aug 1, 2014 at 6:04 PM
Hi Geoff,

That's excellent information. Thank you for that and that will come in handy. I will test out your suggestion, however I've already tried setting SimpleChild to false and the behavior did not change (technically I didn't set it to false, I removed "SimpleChild: true" parameter.....).

Thanks,
Tommy
Coordinator
Aug 2, 2014 at 5:10 AM
Edited Aug 2, 2014 at 5:10 AM
Can you try this with SPServices 2014.01 (latest) so that we can determine if it's a bug in the older version that I've already fixed?

M.
Aug 4, 2014 at 2:53 PM
Hi Marc,

Apologies for the typo in my first post. I have been using 2014.01.
I just tried SPServices 2014.01 with Jquery 1.7.1, 1.11.1, and 2.1.1. I tried with SimpleChild True and False for all 3 versions of JQuery. The behavior was the same for all 6 test cases.

I noticed something that was interesting. I suspect it is not related to this issue but am including it just in case it is unusual. If I have the dropdowns as they are OOTB (SimpleChild:False) and have the developer toolbar open, I get an error from Core.JS when I click on one of the dropdowns. The Dev toolbar pauses the page until I hit continue, and then everything works as expected. The error is "NoModificationAllowedError" and d.outerHTML=e; is highlighted.
Again, I do not think this is related to our issue as I see this behavior on all 3 of our cascading dropdowns and it is only the 3rd dropdown which does not save selected values.
I attempted to reproduce this behavior in another site, totally unmodified team site. However I was unable to get the lookup to render as complex even when looking up to a list with 20+ items.

Thanks,
Tommy
Coordinator
Aug 10, 2014 at 2:33 AM
I'm not sure what's going on, Tommy. I haven't had any other reports of behavior like this. I wonder if it's something about your data. Can you explain a little more?

M.