Question 1:
I need to implement features similar to the Form Field Customization demo. Could you provide the full source code or a GitHub repository for this demo?
Question 2:
How can I remove the tooltip that appears when hovering over annotations in Forms mode?
Question 3:
How can I create a Radio Group Annotation? Currently, I can create a Radio Button using RadioButtonWidgetAnnotation
. Here is my code:
const drawSingleSelect = (data) => {
const { label, isRequired, width, height, pageNumber, x, y } = data;
const { Annotations } = instance.Core;
const widgetFlags = new Annotations.WidgetFlags();
widgetFlags.set('Required', isRequired);
widgetFlags.set(Annotations.WidgetFlags.RADIO, true);
// Optional: Keep at least one state active
widgetFlags.set(Annotations.WidgetFlags.NO_TOGGLE_TO_OFF, true);
const annotFormField = new Annotations.Forms.Field(label, {
type: SDK_FORM_FIELD_TYPES.RADIO,
value: 'Off',
flags: widgetFlags,
});
const widgetAnnot = new Annotations.RadioButtonWidgetAnnotation(annotFormField, {
appearance: 'Off',
appearances: {
Off: {},
First: {},
},
});
widgetAnnot.PageNumber = pageNumber;
widgetAnnot.X = x;
widgetAnnot.Y = y;
widgetAnnot.Width = width;
widgetAnnot.Height = height;
annotationManager.getFieldManager().addField(annotFormField);
annotationManager.addAnnotation(widgetAnnot);
annotationManager.drawAnnotationsFromList([widgetAnnot]);
};
I want to group multiple Radio Buttons created with the code above. Is there an API that can help me create a Radio Group?