# XoopsFormSelect

**Definition**

```php
XoopsFormSelect($caption, $name, $value=null, $size=1, $multiple=false)
```

**Usage** XoopsFormSelect is a normal drop-down menu.

**Most Important Functions**

* addOption($value, $name="", $disabled = false) - add an option to the select, if no name is given the value carries over. From XOOPS 2.2, $disabled can be set to true in order to make the option non-selectable
* addOptionArray($options, $disabled=array()) - add options from a value-name pair array. The array's key is the value. From XOOPS 2.2, $disabled can be an array of values that should be disabled

**Child Classes**

* XoopsFormSelectCountry($caption, $name, $value=null, $size=1) - Countries
* XoopsFormSelectGroup($caption, $name, $include\_anon=false, $value=null, $size=1, $multiple=false) - Usergroups
* XoopsFormSelectLang($caption, $name, $value=null, $size=1) - Language selection
* XoopsFormSelectMatchOption($caption, $name, $value=null, $size=1) - Match ("Starts with", "Ends With", "Equals" or "Contains") selection
* XoopsFormSelectTheme($caption, $name, $value=null, $size=1) - Theme selection
* XoopsFormSelectTimezone($caption, $name, $value=null, $size=1) - Timezone selection
* XoopsFormSelectUser($caption, $name, $include\_anon=false, $value=null, $size=1, $multiple=false) - User selection, $include\_anon will include the anonymous user if true

Common for all these classes is that they do not need the addOption - options are automatically populated

![](/files/-MPw6uKb9qi6dtLhOMjv)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://xoops.gitbook.io/xoops-modules-cookbook/form-classes/forms/xoopsformselect.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
