The following code sets all fields to readonly when the document is loaded. The annotationChanged
event is triggered when the annotations are added to the document and checking the action and e.imported
ensures that they changed because of an import into the document and not because of a user modification.
You can iterate over all fields using the forEachField function of FieldManager.
Note that you'll need to wait for the annotationsLoadedPromise to resolve to ensure that the fields are accessible in the FieldManager.
You can access any field by its field name:
Did you find this helpful?
Trial setup questions?
Ask experts on DiscordNeed other help?
Contact SupportPricing or product questions?
Contact Sales