---
title: onStateValue()
framework: pdfkit
role: symbol
role_heading: Instance Method
path: pdfkit/pdfannotationbuttonwidget/onstatevalue()
---

# onStateValue()

Returns the string associated with the on state of a radio button or checkbox control.

## Declaration

```swift
func onStateValue() -> String!
```

## Return Value

Return Value The string associated with the on state of a radio button or checkbox control.

## Discussion

Discussion This is a required string for controls of types PDFAnnotationButtonWidget and PDFAnnotationButtonWidget. The off state is always labeled “Off”.

## See Also

### Related Documentation

- [PDFAnnotationButtonWidget](pdfkit/pdfannotationbuttonwidget.md)

### Managing Control State Values and Form Fields

- [setOnStateValue(_:)](pdfkit/pdfannotationbuttonwidget/setonstatevalue(_:).md)
- [fieldName()](pdfkit/pdfannotationbuttonwidget/fieldname().md)
- [setFieldName(_:)](pdfkit/pdfannotationbuttonwidget/setfieldname(_:).md)
