> For the complete documentation index, see [llms.txt](https://xoops.gitbook.io/xoops-modules-cookbook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xoops.gitbook.io/xoops-modules-cookbook/form-classes/forms/xoopsformradio.md).

# XoopsFormRadio

**Definition**

```php
XoopsFormRadio($caption, $name, $value = null, $id = "")
```

**Usage** This class shows radio boxes with text. Each radio box must be added with addOption($value, $name="") or addOptionArray($options) function from this class.

addOption can add only one option and addOptionArray can add array items, thats why parameter $options can be only a associative array of value->name pairs. Child classes

![](https://879096944-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M5_mFcvcxsA3M1QhbWd%2Fsync%2F51a96da15ba90094d9876d4bf2a5c2a93a1d71b2.png?generation=1609473962386060\&alt=media)
