PDF kit command
form.setActions
Set field actions
Field Properties ▸ Actions: replace the field's actions. Each item: trigger (mouse_up, mouse_down, mouse_enter, mouse_exit, on_focus, on_blur) and one of javascript (source), url, reset (field names; [] for all), menu (Print, NextPage, PrevPage, FirstPage, LastPage), page (1-based), show / hide (field names), submit (URL). Triggers not listed lose their action. Undoable.
- Kit
- PDF 0.1.0 (.pdf)
- Changes the document
- yes
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
actions | object[] | yes | |
field | string | yes |
Call through pdf_run
pdf_run {
"path": "<file>.pdf",
"steps": [{ "command": "form.setActions", "params": { "actions": <object[]>, "field": <string> } }]
}The required parameters, with placeholders for their types: not a tested example. pdf_run answers the step’s result in completed[i].result.
Result
The kit gives no result schema for this command.
Parameter schema
{
"additionalProperties": false,
"properties": {
"actions": {
"items": {
"additionalProperties": true,
"properties": {
"hide": {
"items": {
"type": "string"
},
"type": "array"
},
"javascript": {
"type": "string"
},
"menu": {
"type": "string"
},
"page": {
"description": "(minimum 1)",
"type": "integer"
},
"reset": {
"items": {
"type": "string"
},
"type": "array"
},
"show": {
"items": {
"type": "string"
},
"type": "array"
},
"submit": {
"type": "string"
},
"trigger": {
"enum": [
"mouse_up",
"mouse_down",
"mouse_enter",
"mouse_exit",
"on_focus",
"on_blur"
],
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"trigger"
],
"type": "object"
},
"type": "array"
},
"field": {
"type": "string"
}
},
"required": [
"actions",
"field"
],
"type": "object"
}Generated from the command list of @kition/[email protected] and the kit itself (pdf_commands through @kition/[email protected], built from KitionAI/kition-pdf@b0d2725). As data: commands.jsonl.