Some test text!
Web / Guides
The following code adds indicator text to all the form fields after the annotationsLoaded promise has resolved.
WebViewer(...)
.then(instance => {
const { documentViewer, annotationManager, Annotations } = instance.Core;
const addIndicator = (widget) => {
widget.setFieldIndicator(true, 'Insert text here');
};
documentViewer.addEventListener('annotationsLoaded', () => {
const widgetAnnotations = annotationManager.getAnnotationsList().filter(annotation => annotation instanceof Annotations.WidgetAnnotation);
widgetAnnotations.forEach(addIndicator);
annotationManager.trigger('annotationChanged', [widgetAnnotations, 'modify', {}]);
});
});
You can choose to hide form field indicators when they would normally be shown using the hideFormFieldIndicators API.
Likewise, you can also choose to show form field indicators if they have been hidden using the showFormFieldIndicators API.
You can choose to hide form field indicators when they would normally be shown or show them when they are hidden, and change the text that they contain using the setFieldIndicator API.
Trial setup questions? Ask experts on Discord
Need other help? Contact Support
Pricing or product questions? Contact Sales