Skip to content
ComPDF
Guides

Form Toolbar

In form mode, a toolbar (CFormToolbar) appears at the bottom for creating and editing various form controls. FormsConfig controls the available form types, tool buttons, and behavior switches.

Available Form Types

availableTypes controls the form type buttons shown in the toolbar:

json
{
  "formsConfig": {
    "availableTypes": [
      "textField",
      "checkBox",
      "radioButton",
      "listBox",
      "comboBox",
      "signaturesFields",
      "pushButton"
    ]
  }
}
ValueDescription
textFieldText input field
checkBoxCheck box
radioButtonRadio button
listBoxList box
comboBoxCombo box (dropdown)
signaturesFieldsSignature field
pushButtonPush button

Available Tools

json
{
  "formsConfig": {
    "availableTools": [
      "undo",
      "redo"
    ]
  }
}
ValueDescription
undoUndo
redoRedo

Behavior Switches

Create Options Dialog

Controls whether to automatically show the property settings dialog after creating specific form controls (only supported for ListBox, ComboBox, and PushButton):

json
{
  "formsConfig": {
    "showCreateListBoxOptionsDialog": true,
    "showCreateComboBoxOptionsDialog": true,
    "showCreatePushButtonOptionsDialog": true
  }
}
FieldDescription
showCreateListBoxOptionsDialogShow property dialog after creating a list box
showCreateComboBoxOptionsDialogShow property dialog after creating a combo box
showCreatePushButtonOptionsDialogShow property dialog after creating a push button

Intercept Actions

Intercept default form interaction behavior for custom handling via event callbacks (only supported for ListBox, ComboBox, and PushButton):

json
{
  "formsConfig": {
    "interceptListBoxAction": false,
    "interceptComboBoxAction": false,
    "interceptPushButtonAction": false
  }
}
FieldDescription
interceptListBoxActionIntercept list box click
interceptComboBoxActionIntercept combo box click
interceptPushButtonActionIntercept push button click

When set to true, clicking the corresponding form control will no longer execute the default behavior. Instead, it will trigger a CPDFCustomEventCallbackHelper callback where you can implement custom logic.

CFormToolbar Component

CFormToolbar is the core UI component of the form toolbar, located in the com.compdfkit.tools.forms.pdfformbar package.

Related classes:

ClassDescription
CFormToolbarForm toolbar main view
CFormToolbarAdapterForm type list adapter
CFormToolBeanForm tool item data model