Auto-Populate Select Fields
Auto-populate the options in your <select> field based on a category you specify in the data attribute and add an optional custom placeholder.
How Does It Work?
Apply the Geo Select data attribute to a <select> element, using a value corresponding to the variable name for one of the available categories in the table at the bottom.
How To Implement
The category name is case-sensitive and must match the respective 'Category Variable'.
The default placeholder option for the <select> element will be 'Choose an Option'. You can override this by setting the placeholder data attribute noted above.
The Geo Form data attribute does not need to be added to the <form> element for the Geo Select data attribute to function.
*ββββ βAttribute names with a red asterisk are required; all others listed in the table are optional.
Developer Tip: With a little JavaScript, you can dynamically update the options in one <select> based on what was chosen in another. For example, if someone chooses 'Canada', add Canadian provinces and territories. View the code snippet.
Available Categories
Examples
Last updated
Was this helpful?