# ComboBoxField Class

The `ComboBoxField` class corresponds to the `FormFieldType.ComboBox` enum value and represents a dropdown control with choices that you can select.

## Properties

`ComboBoxField` provides the following properties:

| Property                        | Description                                                                                                                                                                                                                        |
| ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Value`                         | Gets or sets the single choice that is selected. `ChoiceOption` has `Value` and `UserInterfaceValue` properties. `UserInterfaceValue` is optional. When `null`, `Value` is used to display the choice in the UI.                   |
| `DefaultValue`                  | Gets or sets the default selected choice 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 Widget annotations representing the field on the PDF pages. Widgets are created with `AddWidget()` and can be removed with `Remove()`. Implements `IEnumerable`.                                                 |
| `Options`                       | A `ChoiceOptionCollection` containing all available choices for this field. Modify through the indexer, `Add()`, `RemoveAt()`, and `Clear()`. Each `ChoiceOption` instance can be added only once.                                 |
| `ShouldCommitOnSelectionChange` | Indicates whether to commit the selected value on selection change.                                                                                                                                                                |
| `HasEditableTextBox`            | Indicates whether the dropdown provides an additional text box input, allowing you to enter a value different from the provided choices.                                                                                           |
| `ShouldSpellCheck`              | Indicates whether the text is spell checked during input.                                                                                                                                                                          |

**Create a ComboBoxField and add it to a page**

```C#
ComboBoxField comboBoxField = new ComboBoxField("SampleComboBox");

comboBoxField.Options.Add(new ChoiceOption("First Value"));
comboBoxField.Options.Add(new ChoiceOption("Second Value"));
comboBoxField.Options.Add(new ChoiceOption("Third Value"));

comboBoxField.Value = comboBoxField.Options[1];

VariableContentWidget widget = comboBoxField.Widgets.AddWidget();
widget.Rect = new Rect(100, 100, 200, 30);
widget.RecalculateContent();

document.AcroForm.FormFields.Add(comboBoxField);
document.Pages[0].Annotations.Add(widget);
```

## 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)
* [CombTextBoxField](https://www.telerik.com/document-processing-libraries/documentation/libraries/radpdfprocessing/model/interactive-forms/form-fields/combtextboxfield)
* [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)
