def scopes_picker_filter(form, name, checkboxes_on_top = true)
      options = {
        multiple: true,
        legend_title: I18n.t("decidim.scopes.scopes"),
        label: false,
        checkboxes_on_top: checkboxes_on_top
      }

      form.scopes_picker name, options do |scope|
        {
          url: decidim.scopes_picker_path(
            root: try(:current_participatory_space)&.scope,
            current: scope&.id,
            title: I18n.t("decidim.scopes.prompt"),
            global_value: "global"
          ),
          text: scope_name_for_picker(scope, I18n.t("decidim.scopes.prompt"))
        }
      end
    end
def scopes_picker_filter(form, name, checkboxes_on_top = true)
      options = {
        multiple: true,
        legend_title: I18n.t("decidim.scopes.scopes"),
        label: false,
        checkboxes_on_top: checkboxes_on_top
      }

      form.scopes_picker name, options do |scope|
        {
          url: decidim.scopes_picker_path(
            root: try(:current_participatory_space)&.scope,
            current: scope&.id,
            title: I18n.t("decidim.scopes.prompt"),
            global_value: "global"
          ),
          text: scope_name_for_picker(scope, I18n.t("decidim.scopes.prompt"))
        }
      end
    end
Renders a scopes picker field in a filter form.
 form - FilterFormBuilder object
 name - attribute name
 checkboxes_on_top - Show picker values on top (default) or below the picker prompt

 Returns nothing.