---
title: "form.setActions: Set field actions — PDF kit command — Kition"
description: "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."
canonical: "https://developer.kition.ai/docs/kits/pdf/commands/form.setActions"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/pdf/commands/form.setActions](https://developer.kition.ai/docs/kits/pdf/commands/form.setActions)

# 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); reference: [PDF kit commands](https://developer.kition.ai/docs/kits/pdf.md)
- Changes the document: yes

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `actions` | `object[]` | yes |  |
| `field` | `string` | yes |  |

## Call through pdf_run

```text
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

```json
{
  "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/pdf-darwin-arm64@0.1.0 and the kit itself (pdf_commands through @kition/cli@0.1.1, built from KitionAI/kition-pdf@b0d2725).
