SPCascadeDropdowns tweaks?

Jun 17, 2011 at 9:58 PM
Edited Jun 17, 2011 at 10:01 PM

Hi Marc, just coming across your work, was looking for a cascading functionality for dropdowns- really appreciate the work you've done!

I just started using the SPCascadeDropdowns function and got it to work wonderfully,

I'm using jquery.SpServices-0.6.1.js and jquery-1.4.2.js,

I wanted to make some tweaks on the lists and needed help so I searched the forum for hours but couldn't find anything, would appreciate any kind of guidance...

#1. I was wondering if there's any way to make the cascading work both ways? right now it's ParentColumn -> ChildColumn only. I wanted to give the user an option to select the ChildColumn first also, so if the user were to select Philadelphia, on the ChildColumn the ParentColumn would be filtered to PA.... assume this is not something simple..

#2. I see on your demo page http://www.sympraxisconsulting.com/Demos/Demo%20Pages/CascadingDropdowns.aspx    you have Midwest and Choose State... as defaults,

on mine when I initially load the page the list is empty and my first choice down is (none) and then the values... I thought promptText was used for "Choose State..." but it's not used in the script sample you provided on http://www.sympraxisconsulting.com/demos/Demo%20Code/CascadingDropdowns.js

so i'm very confused... has promptText been deprecated or something?

#3. After the user selects a value in the ParentColumn and if the ChildColumn only one value I wanted that value to be selected automatically to save the user some clicks, right now the drop down displays"(none)" and that one value...  I read somewhere in the forum that if I set promptText = "", the first value is selected but it doesn't seem to work for me.....

 

Thank you so much for your time and help,

 

John

Coordinator
Jun 18, 2011 at 5:35 AM

John:

First off, you're welcome!

#1 - No, not as built. If you think about it, there are so many variations on how people might want their forms to work that it's nearly impossible to build every variant into a reliable set of functions. SPCascadeDropdowns works to filter "top to bottom". You could certainly build some custom functionality to meet your needs using some of the SPServices functions as the basis.

#2 - The settings for the columns have an impact on what you see as options in your dropdowns (whether they are required, if they have a default value, etc.). The promptText idea is actually not a great one, but since I included it in a very early version, I haven't wanted to remove it so that we have backward compatibility. The problem with it is that if the user leaves it selected, SharePoint can throw some pretty ugly errors depending on the column settings. I advise against using that option in general.

#3 I've had some other requests for what you ask about. There's an item in the Issue Tracker for it: add your vote of you'd like to see it move up in priority.

M.