def user_group_select_field(form, name)
      form.select(name,
                  current_user.user_groups.verified.map { |g| [g.name, g.id] },
                  selected: form.object.user_group_id.presence,
                  include_blank: current_user.name,
                  label: t("new.amendment_author", scope: "decidim.amendments"))
    end
def user_group_select_field(form, name)
      form.select(name,
                  current_user.user_groups.verified.map { |g| [g.name, g.id] },
                  selected: form.object.user_group_id.presence,
                  include_blank: current_user.name,
                  label: t("new.amendment_author", scope: "decidim.amendments"))
    end
Renders a UserGroup select field in a form.