[#31881] Can not add class attribute to options in JForm list field
(Fix #2721)