# RadioButtonField Class

The `RadioButtonField` class corresponds to the `FormFieldType.RadioButton` enum value and represents a group of radio button options. You can select at most one option from the group.

## Properties

`RadioButtonField` provides the following properties:

| Property                     | Description                                                                                                                                                                                                                                                                                                                                                                                                  |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Value`                      | Gets or sets the single choice that is selected. `RadioOption` has a single `Value` text property.                                                                                                                                                                                                                                                                                                           |
| `DefaultValue`               | Gets or sets the default selected option used when the [AcroForm](https://www.telerik.com/document-processing-libraries/documentation/libraries/radpdfprocessing/model/interactive-forms/acroform) is reset to its default values.                                                                                                                                                                           |
| `Widgets`                    | The collection of [RadioButtonWidget](https://www.telerik.com/document-processing-libraries/documentation/libraries/radpdfprocessing/model/annotations/widgets#radiobuttonwidget-class) annotations representing the field. Each widget represents a single radio button option through its `Option` property. Widgets are created with `AddWidget()` and removed with `Remove()`. Implements `IEnumerable`. |
| `Options`                    | A `RadioOptionCollection` containing all available options for this field. Modify through the indexer, `Add()`, `RemoveAt()`, and `Clear()`. Each `RadioOption` instance can be added only once.                                                                                                                                                                                                             |
| `AllowToggleOff`             | Indicates whether radio buttons can be deselected by clicking an already-selected radio button.                                                                                                                                                                                                                                                                                                              |
| `ShouldUpdateRadiosInUnison` | Indicates whether all radio buttons sharing the same `RadioOption` value are selected in unison. When `false`, at most one radio button is selected even if multiple share the same option value.                                                                                                                                                                                                            |

**Create RadioButtonFields and add them to a page**

```C#
RadioButtonField radioButtonField = new RadioButtonField("SampleRadioButton");

radioButtonField.Widgets.AddWidget(new RadioOption("True")).Rect = new Rect(0, 0, 20, 20);
radioButtonField.Widgets.AddWidget(new RadioOption("False")).Rect = new Rect(25, 0, 20, 20);
radioButtonField.Widgets.AddWidget(new RadioOption("False")).Rect = new Rect(50, 0, 20, 20);

document.AcroForm.FormFields.Add(radioButtonField);

foreach (RadioButtonWidget widget in radioButtonField.Widgets)
{
    document.Pages[0].Annotations.Add(widget);
    widget.RecalculateContent();
}
```

## See Also

* [Form Field](https://www.telerik.com/document-processing-libraries/documentation/libraries/radpdfprocessing/model/interactive-forms/form-fields/formfields)
* [PDF Annotation Widgets](https://www.telerik.com/document-processing-libraries/documentation/libraries/radpdfprocessing/model/annotations/widgets)
* [CheckBoxField Class](https://www.telerik.com/document-processing-libraries/documentation/libraries/radpdfprocessing/model/interactive-forms/form-fields/checkboxfield)
* [Create Interactive Forms SDK example](https://github.com/telerik/document-processing-sdk/tree/master/PdfProcessing/CreateInteractiveForms)
* [Modifying Forms SDK example](https://github.com/telerik/document-processing-sdk/tree/master/PdfProcessing/ModifyForms)
