Jump to content
  • 0

custom sort cascading dropdown



Does anyone have any great ideas on how to get a cascading dropdown to sort on something other than its value? Here is the problem:

I have a view of Courses that my cascading dropdown looks up to. It shows the following Course abbreviations in a listbox:

SMR 06/10

SMR 07/09

SMR 07/12

I want the dropdown to sort on Start Date (which is present in the view) rather than Course abbreviations. It must, however, search on Course abbreviations, so in the widget, Display and Value must be set to Course abbreviation. Any ideas?


Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

If you need to use the same field for value and for display for your cascading dropdown, then you can use the following approach. Create a virtual field and use cascading dropdown form element for it, use Courses as display and Start Date as value, and select - sort by value option. Use hidden form element for your real course field. And you have to create a JS function, that will update this fields value with selected virtual dropdown option. This function should be called on form submit.

Hope this helps.

Link to comment
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.

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.

  • Create New...