Jump to content
  • 0
Sign in to follow this  
Deanne

Elimate custom value on dropdown

Question

When there is only one selection for the result of a cascading dropdown, how can I remove the custom value and only show that one result?  For example, when I select a company from my dropdown list, usually the cascading dropdown shows "Please Select" (my custom value) and, when I click on it, it shows multiple locations for that company.  What if the company I select only has one location?  I don't want the "Please Select" to show up, only the one location option.  However, if there is more than one location, I do want the custom value of "Please Select" to show.

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

This is not customizable by standard features. You can either have a default value or not.  But using JS. you can count the number of options in the dropdown when it is fully loaded and if there is only two then remove the first option.

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...