This project has moved and is read-only. For the latest updates, please go here.

promptText on Cascading Dropdowns

Jan 25, 2010 at 9:32 PM

I setup a cascading dropdown list and it works fine. My only issue is that the promptText doesn't show up. Also, whether I set the fields to required or not, I always get the (None) option in the list, is there any way to remove that?

Jan 25, 2010 at 9:34 PM


Which version of the library are you using?


Jan 26, 2010 at 4:59 PM

I'm using 0.4.8


Jan 26, 2010 at 7:24 PM

OK, in v0.4.8, here's what should happen:

  • For dropdowns with <20 options, you should see the promptText you specify *if* the column is not required
  • For dropdowns with 20+ options, you should see the (None) prompt *unless* the column is required


Jan 27, 2010 at 8:07 PM

If I select 1 of the items in the first list, the 2nd list has more than 20 items. For the other 4 options in the first list, the 2nd list has less than 20 items.

Anyhow, I set the fields to required and I still get the (None) instead of the prompttext.


I added the cascading dropdown to a different list that only has 17 items total (2-3 for each item chosen in the 1st list), and it's working fine on that one.

It's not too big of a deal, I just think it looks better to say Choose Network... rather than (None).


Thanks for the quick replies.

Jan 27, 2010 at 8:21 PM
Edited Jan 27, 2010 at 9:08 PM

It's actually SharePoint's behavior that we're working around here.  Leaving my jQuery stuff totally out of it:

  • When there are fewer than 20 options, SharePoint renders the control as a plain old <SELECT>.  If the column value is not required, there is an empty value at the top of the list. (I call these Simple dropdowns.)
  • When there are 20+ options, SharePoint gets all helpful and renders the control as an <INPUT> field. Then, when you either type in the <INPUT> field or click on the dropdown image, it dynamically creates a <SELECT> with the options. If the column value is not required, there is an (None) value at the top of the list. (I call these Complex dropdowns.)

So you can see that there's already some inconsistency.  When you use SPCascadeDropdowns, I try to live within that framework.  One inconsistency that I introduced was the "Choose whatever..." prompt on Simple dropdowns.  People seemed to like it, but I recently added in the capability to hide it.  I also fixed the problem in v0.4.8 where the prompts were showing up if the columns were required.  When this was the case, selecting the prompt option would throw an error on the form submission.

Hopefully this will help it all to make more sense.