<!--
{
  "availability" : [
    "macOS: 10.4.0 - 10.12.0"
  ],
  "documentType" : "symbol",
  "framework" : "PDFKit",
  "identifier" : "/documentation/PDFKit/PDFAnnotationChoiceWidget/setFieldName(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "PDFKit"
    ],
    "preciseIdentifier" : "c:objc(cs)PDFAnnotationChoiceWidget(im)setFieldName:"
  },
  "title" : "setFieldName(_:)"
}
-->

# setFieldName(_:)

Sets the internal field name associated with the widget annotation’s value.

```
func setFieldName(_ name: String!)
```

## Parameters

`name`

The name to be used as the internal field name associated with the widget annotation.

## Discussion

If the widget annotation is backed by PDF form data, it can associate an optional field name with a value or other data.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)