# FormOption
Class
## About
`FormOption` represents one option in a dropdown, radio group, or other option-based form control. It stores the submitted value, user-visible label, default selection, disabled state, and rich-text label state where supported.
## Event Definitions
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| Changed | (None) | (None) | Raised when an option property changes. |
## Methods
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| Constructor | caption As String <br> value As String = "" | (None) | Creates a new form option. |
| Duplicate | (None) | FormOption | Returns an indepent copy of this option. |
| FromJSON | data As JSONItem | Boolean | Restores the option from JSON. |
| ToJSON | (None) | JSONItem | Returns the option as JSON. |
## Properties
| Name | Type | Default Value | Description |
| --- | :---: | :---: | --- |
| Attributes | CaptionState | (None) | Returns a copy of the option's styled caption content. |
| Caption | String | (None) | Gets or sets the user-visible option text. |
| Disabled | Boolean | (None) | Gets or sets whether the option is disabled. |
| Selected | Boolean | (None) | Gets or sets whether the option is selected. |
| Value | String | (None) | Gets or sets the submitted option value. |
## Notes
Options are owned by their containing form control.
### JSON Format
`caption` and `value` are strings. `disabled` and `selected` are Boolean. `captionContent` is a `TextSnapshot` containing the rich editable label state. Containers preserve option order by storing these objects in an `options` array.
`caption` and `value` are omitted when empty, and `disabled` and `selected` when `False`; missing names restore those defaults.
### Value and Label
`Value` is submitted by exported HTML while the label is drawn for the user. Keep them separate when a display caption should map to a stable application value. Duplicate controls must duplicate their options rather than sharing mutable option instances.