Create and edit form fields

There are two options to create and edit form fields. First is using a UI component that can create and edit form fields. Second is an API guide to programmatically create form fields.

Create & edit form fields in Android

Interactive creation and editing for form fields such as text fields, checkboxes, radio buttons, dropdowns, signatures, etc. is supported by the Apryse Android SDK.

By default, creating and editing form fields in the drop-in components DocumentActivity and PdfViewCtrlTabHostFragment2 are automatically enabled unless disabled using ToolManagerBuilder. You can learn more about configuring ToolManager here.

Supported widget types

Text widget

TextFieldCreate tool is responsible for making TextWidget.

Apryse Docs Image

Checkbox widget

CheckboxFieldCreate tool is responsible for making CheckBoxWidget.

Apryse Docs Image

Radio button widget

RadioGroupFieldCreate tool is responsible for making RadioButtonWidget.

Apryse Docs Image

List box widget

ListBoxFieldCreate tool is responsible for making ListBoxWidget.

Apryse Docs Image

Combo box widget

ComboBoxFieldCreate tool is responsible for making ComboBoxWidget.

Apryse Docs Image

Signature widget

SignatureFieldCreate tool is responsible for making SignatureWidget.

Apryse Docs Image

Disable form field creation

You can disable form field creation using the ToolManagerBuilder class and disabling the relevant ToolMode:

1// Create a custom ToolManager with disabled form field creation
2ToolManager.ToolMode[] toolModes = {
3 ToolManager.ToolMode.FORM_CHECKBOX_CREATE,
4 ToolManager.ToolMode.FORM_SIGNATURE_CREATE,
5 ToolManager.ToolMode.FORM_TEXT_FIELD_CREATE,
6 ToolManager.ToolMode.FORM_RADIO_GROUP_CREATE,
7 ToolManager.ToolMode.FORM_COMBO_BOX_CREATE,
8 ToolManager.ToolMode.FORM_LIST_BOX_CREATE
9};
10ToolManagerBuilder tmBuilder = ToolManagerBuilder.from()
11 .disableToolModes(toolModes);
12
13// Add ToolManagerBuilder to your ViewerConfig
14ViewerConfig config = new ViewerConfig.Builder()
15 .fullscreenModeEnabled(true)
16 .multiTabEnabled(true)
17 // ...
18 .toolManagerBuilder(tmBuilder)
19 .build();

Did you find this helpful?

Trial setup questions?

Ask experts on Discord

Need other help?

Contact Support

Pricing or product questions?

Contact Sales