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:
{
"formsConfig": {
"availableTypes": [
"textField",
"checkBox",
"radioButton",
"listBox",
"comboBox",
"signaturesFields",
"pushButton"
]
}
}2
3
4
5
6
7
8
9
10
11
12
13
| Value | Description |
|---|---|
textField | Text input field |
checkBox | Check box |
radioButton | Radio button |
listBox | List box |
comboBox | Combo box (dropdown) |
signaturesFields | Signature field |
pushButton | Push button |
Available Tools
{
"formsConfig": {
"availableTools": [
"undo",
"redo"
]
}
}2
3
4
5
6
7
8
| Value | Description |
|---|---|
undo | Undo |
redo | Redo |
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):
{
"formsConfig": {
"showCreateListBoxOptionsDialog": true,
"showCreateComboBoxOptionsDialog": true,
"showCreatePushButtonOptionsDialog": true
}
}2
3
4
5
6
7
| Field | Description |
|---|---|
showCreateListBoxOptionsDialog | Show property dialog after creating a list box |
showCreateComboBoxOptionsDialog | Show property dialog after creating a combo box |
showCreatePushButtonOptionsDialog | Show 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):
{
"formsConfig": {
"interceptListBoxAction": false,
"interceptComboBoxAction": false,
"interceptPushButtonAction": false
}
}2
3
4
5
6
7
| Field | Description |
|---|---|
interceptListBoxAction | Intercept list box click |
interceptComboBoxAction | Intercept combo box click |
interceptPushButtonAction | Intercept 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:
| Class | Description |
|---|---|
CFormToolbar | Form toolbar main view |
CFormToolbarAdapter | Form type list adapter |
CFormToolBean | Form tool item data model |