---
title: "setFieldName(_:)"
framework: pdfkit
role: symbol
role_heading: Instance Method
path: "pdfkit/pdfannotationchoicewidget/setfieldname(_:)"
---

# setFieldName(_:)

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

## Declaration

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

## Parameters

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

## Discussion

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

## See Also

### Managing the Associated Field Name

- [fieldName()](pdfkit/pdfannotationchoicewidget/fieldname().md)
