Results 1 to 7 of 7

Thread: Alphabetical Drop Downs

  1. #1
    mhoppes is offline Sugar Community Member
    Join Date
    May 2007
    Posts
    45

    Default Alphabetical Drop Downs

    I've recently edited some of the drop down menus and have made some additions. The additions are appearing at the bottom of the drop down. Is there anyway, short of modifying the php code, to make them resort and alphabetize?

  2. #2
    sacramentojoe is offline Sugar Community Member
    Join Date
    Nov 2005
    Posts
    447

    Default Re: Alphabetical Drop Downs

    You can re-arrange the order in the studio

  3. #3
    mhoppes is offline Sugar Community Member
    Join Date
    May 2007
    Posts
    45

    Default Re: Alphabetical Drop Downs

    Quote Originally Posted by sacramentojoe
    You can re-arrange the order in the studio
    Really? Care to share how? I can only figure out how to SWAP entries. That is, if I drag a new entry on top of an old entry it swaps them.

  4. #4
    Piepkorn is offline Junior Member
    Join Date
    Jun 2007
    Posts
    2

    Default Re: Alphabetical Drop Downs

    Quote Originally Posted by mhoppes
    Really? Care to share how? I can only figure out how to SWAP entries. That is, if I drag a new entry on top of an old entry it swaps them.

    Drag and Drop Database Values will reorder list.

    ...well I guess that's same as what you said above, but swap until the order you want is obtained.
    Last edited by Piepkorn; 2007-07-09 at 03:53 PM.

  5. #5
    crmtamer is offline Sugar Community Member
    Join Date
    Jul 2007
    Posts
    15

    Default Re: Alphabetical Drop Downs

    You have to move each item one line at a time. For example, if the item you want to move is the fourth item in the list, and you want it to appear at the top, you would move it up to the third position, then up to the second position, and then to the first position. As you move it each time, it swaps with the item in that row. A bit tedious but it works.

  6. #6
    enrikm is offline Sugar Community Member
    Join Date
    Dec 2006
    Posts
    61

    Default Re: Alphabetical Drop Downs

    I believe the original poster wanted an automated way of doing this. Assuming you have a thousand entries in your dropdown and then you forgot something in the middle, it would be inefficient to reorder everything from the added item down. Unfortunately some coding might be required here, doing a sort of the items everytime it has to be displayed.

  7. #7
    ivolator's Avatar
    ivolator is offline Sugar Community Member
    Join Date
    Sep 2006
    Location
    Dagobah
    Posts
    98

    Default Re: Alphabetical Drop Downs

    two ways:
    1.Down and dirty
    a. Go to your EditView.php and figure aout the name of the field.
    b. Then figure out which $app_list_string['?????'] it is generated by.
    c. open custom/include/language/YOUR_LANGUAGE.php
    d. Can you see your $app_list_strings node? do it manually now if you don't have too many.
    2.Not so dirty
    Do a.
    Do b.
    c. Open DetailView.php
    d. right before you see your $app_list_strings['????'] used like this
    PHP Code:
    get_select_options_with_id($app_list_strings['??????'], $focus->LOOKSLIKEYOURFIELDNAME)); 
    do this
    PHP Code:
     natcasesort($app_list_strings['??????']) ; 
    hope this helped

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 2007-08-29, 06:16 AM
  2. Drop downs not storing data
    By devknob in forum Help
    Replies: 3
    Last Post: 2007-04-25, 04:05 PM
  3. Order custom drop downs
    By Mik3e in forum Help
    Replies: 2
    Last Post: 2007-04-25, 01:32 PM
  4. Drop Downs behave strangely...
    By roblaus in forum Help
    Replies: 3
    Last Post: 2006-12-29, 03:31 PM
  5. Drop downs in portal
    By smelamed in forum Help
    Replies: 2
    Last Post: 2006-03-22, 03:47 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •