Posted: July 28, 2020 at 4:39 pm
Hi, our client wants to sort the custom message templates by alphabetical order rather than the default ID (where newest lands at the end).
Ideally on both the messages -> custom message templates as well as on the dropdown message template selector popup that appears when you send a batch message.
I tried the snippet mentioned here https://eventespresso.com/topic/custom-messages-no-longer-sorted-alphabetically/ and it didn’t work for us on the selector.
Can you let me know if there’s a way to put these into an auto alpha sort?
I checked into this and currently the only way to modify the order is using some jQuery like that snippet does and you can’t change the order within Event Espresso -> Messages as it stands.
I retested the snippet you linked to and it’s reordering the dropdowns for me, where are you adding that code?
With that code loaded on the editor, if you open Chrome Dev Tools (or similar) and look in the console, do you see any errors there?
Ah, no. My apologies as I misread your initial post.
That snippet isn’t ordering that dropdown, it’s ordering the templates in the event editor itself.
This section: https://monosnap.com/file/2B4raUMKe4SG3OkpchxZ6OaUcEdhNo
We don’t have a snippet to order that section and its currently not possible to change the order within Event Espresso -> Messages to be based on Template Name sorted alphabetically.
I’ll check to see if we can add a filter for this and get back to you.
Thank you, please let me know what you find.