Alphabetical order in drop down menus

Hi,
When I create a new appointment using the ADD NEW button, the drop down menu one the line marked USER is not in alphabetical order. The same with the one on the line marked PROVIDER. Is there a way to fix this?

Thanks for your help !
Françoise

  • Nastia

    Hello @Françoise, I hope you are well today!

    Thank you for your question!

    I just tested the user list on my set up, and the usernames sorted in Alphabetical order. The Appotment+ keep the WordPrees configuration to view user list and it's viewing with Alphabetical order by default. Please visit Users -> All users and check in what order usernames are appearing.

    This may be a conflict with a plugin. Would you please run a quick check and disable all other plugins? Once you do this check for this issue again, if the user list is appears in order, activate one plugin at the time, while testing, to find out which one is causing this issue. Please switch at the default WordPress theme as well!
    Follow the flowchart from our user manual:
    https://premium.wpmudev.org/manuals/using-wpmu-dev/getting-support/

    Let us know how it went!

    Kind Regards,
    Nastia

  • Nastia

    Hello @Françoise, I hope you are well today!

    I still have trouble finding the cause of this issue. Would you please send to us your credentials so I can have a closer look?

    You can send credentials by using our secure contact form https://premium.wpmudev.org/contact/

    Subject: “Attn: Anastasia”
    -WordPress admin username
    -WordPress admin password
    -login url
    -FTP credentials (host/username/password)
    -link back to this thread for reference
    -any other relevant urls

    Select “I have a different question” for your topic - this and the subject line ensure that it gets assigned to me
    https://premium.wpmudev.org/contact/

    Have a nice day and take care :slight_smile:

    Cheers,
    Nastia

  • Nastia

    Hello @Françoise, I hope you are well today!

    Please accept my sincere apologies for late reply.

    Would you please send your FTP credentials as well, so we could check the plugin's core code?
    Subject: “Attn: Anastasia”
    FTP credentials:
    - host
    - username
    - password

    Select “I have a different question” for your topic. Please put my name in the subject line so it will be assigned to me
    https://premium.wpmudev.org/contact/

  • Predrag Dubajic

    Hi Françoise,

    Apologies for the delay here, we are a bit low on staff during the holidays.

    In plugin code it's currently set to display users login name but the sorting is set to users display name, you can change this by going to /wp-content/plugins/appointments/appointments.php and replace line 6528 which is currently this:
    $html .= wp_dropdown_users( array( 'show_option_all'=>__('Not registered user','appointments'), 'show'=>'user_login', 'echo'=>0, 'selected' => $app->user, 'name'=>'user', ) );

    You can replace the line in two ways, first would still use login name and sort it according to login name:
    $html .= wp_dropdown_users( array( 'show_option_all'=>__('Not registered user','appointments'), 'show'=>'user_login', 'echo'=>0, 'selected' => $app->user, 'name'=>'user', 'orderby'=>'user_login' ) );

    Or you can show display name and sort it by display name with this code:
    $html .= wp_dropdown_users( array( 'show_option_all'=>__('Not registered user','appointments'), 'show'=>'display_name', 'echo'=>0, 'selected' => $app->user, 'name'=>'user', 'orderby'=>'display_name' ) );

    Note that these changes will be gone after the update but I will see with plugin developers to change it in future updates.

    Best regards,
    Predrag

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.