🌎
Geoflow Docs
  • 🌎Welcome to Geoflow
  • 🔍Overview
    • Visitor Data Properties
  • ⭐Features
    • Geo Visibility
      • Define Multiple Conditions
      • Match All Conditions
      • Partially Match Condition
      • Reverse Condition Value
      • Custom Classes
    • Geo Form
      • Autofill Form Fields
      • Auto-Populate Select Fields
    • Geo Text
    • Geo Style
    • Geo Script
    • Script Extensions
      • Performance
      • Marketing Parameters
    • Optional Settings
      • Script Tag Data Attributes
      • Meta Tags
  • ⚙️Advanced
    • Code Snippets
    • Methods
      • run
      • getData
      • updateData
      • displayData
      • clearData
      • checkCondition
      • select
    • Callbacks
    • Events
    • REST API
      • Get Visitor IP
      • Get Visitor Data
      • Add Website
      • Delete Website
      • Update Website
      • List Websites
      • Get Website
  • 📄Legal
    • License Agreement
Powered by GitBook
  1. Advanced
  2. Methods

select

Appends one or more <option> elements to a <select> element based on the category passed and an optional placeholder.

PreviouscheckConditionNextCallbacks

Last updated 1 year ago

Was this helpful?

Description

This method can programmatically populate a <select> element with <option> elements based on a specified category. An optional can also be passed, appearing as the first <option> element. Otherwise, the default placeholder will be used 'Choose an Option'.

The first parameter should be the CSS Selector for the <select> element (e.g. #chooseCountry), followed by the category of options (e.g. all-countries) you would like to use and lastly, an optional placeholder if you'd like to override the default one (e.g. Choose a Country).

The available categories are specified on this page .

Parameters

elementIdentifier (string), category (string), placeholder (string, optional)

Using This Method

geoflow.select('#choose-country', 'all-countries', 'Choose a Country');

Output

true (boolean)
here
⚙️
Page cover image