Getting field info that was just modified

How can we get the information from a field that was just modified ?

The toolManager has this new method: formFieldDataModified triggered when a field is modified.
However the output of this method is a PTAnnot and not a PTField.
How can we access the PTField please ?

Example:

`
func toolManager(_ toolManager: PTToolManager, formFieldDataModified annotation: PTAnnot, onPageNumber pageNumber: UInt) {

// How can we get the Field that was just modified ?? The annotation doesn’t give the Field info.

})
`

Thanks

Hi Laurant,

The PTAnnot that is returned can be used to get the PTField.

For example, please refer to the following code:

if (annotation.getType() == e_ptWidget) { let widget = PTWidget(annotation) let field = widget.getField() }

Please let me know if this works for you, and if you have any further questions.

Thanks.

Works perfectly.

Thanks Shakthi.