[fix] Javascript fails when form field has no options