LILY-307: Made it so the popup shows labels in the same order they are displayed in the form