Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPServices.SPCascadeDropdowns - 'All' option? #52

Open
jhueschen opened this issue Dec 16, 2016 · 3 comments
Open

SPServices.SPCascadeDropdowns - 'All' option? #52

jhueschen opened this issue Dec 16, 2016 · 3 comments

Comments

@jhueschen
Copy link

Greetings!

Loving SPServices.SPCascadeDropdowns! It occurs to me that having a function based option for an (all) selection would be useful. Thinking it would be similar to the (All) option automatically created by Excel when filtering. Not sure if it is possible, or already available?

Example
State & City columns, State filters City. End form has optional input for State, just requires correct city. User isn't sure what state a particular city is in, so would prefer to scroll through the entire list of possible cities. Can select (All) to view all cities and State returns null/blank (or the correct lookup value for the city, which would be even better!)

@sympmarc
Copy link
Owner

Glad you're loving SPCascadeDropdowns! I think the scenario you describe is basically what you get if you don't call SPCascadeDropdowns at all. The issue becomes one of differentiation between potentially identical values.

I know your example is contrived, but consider the fact that there is a Springfield in every state. If you don't have the cascading, there's no way to know which is the correct value.

I'm thinking a better approach would be to conditionally allow the end user to "turn off" cascading. In many cases, we won't allow that, but in your example you would want to. Does that make sense?

@jhueschen
Copy link
Author

Yes that makes perfect sense, I had not thought about the identical situation. Regarding conditionally allowing the user to turn off cascading, do you think that is something I could program into the form Javascript or would that need to be done at a higher level (your source, etc)?

@sympmarc
Copy link
Owner

sympmarc commented Dec 25, 2016

@jhueschen Right now, there's no way to "turn off" cascading once you've instantiated it, unfortunately. You could allow them to conditionally turn it on, though, by giving them something in the UI to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants