---
title: "PDF form events and notifications in Android"
canonical_url: "https://www.nutrient.io/guides/android/events-and-notifications/forms/"
md_url: "https://www.nutrient.io/guides/android/events-and-notifications/forms.md"
last_updated: "2026-06-05T20:16:40.046Z"
description: "Explore how to handle PDF form events using the Android SDK's FormManager and PdfFragment for effective form management."
---

# Understand PDF form events in Android SDK

In Nutrient Android SDK, form events are accessible through the [`FormManager`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui.special_mode.manager/-form-manager/index.html) interface, which is implemented by the [`PdfFragment`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-fragment/index.html). There, you can find the following listeners for subscription:

| Listener                                 | Description                                                                             |
| ---------------------------------------- | --------------------------------------------------------------------------------------- |
| `OnFormElementClickedListener`           | Listener for form element click events.                                                 |
| `OnFormElementDeselectedListener`        | Listener for form element deselection.                                                  |
| `OnFormElementEditingModeChangeListener` | Listener for form element editing mode enter/exit.                                      |
| `OnFormElementSelectedListener`          | Listener for form element selection.                                                    |
| `OnFormElementUpdatedListener`           | Listener for form element updated events.                                               |
| `OnFormElementViewUpdatedListener`       | Listener for form element view updates — validation, contents of the view changed, etc. |

## Reacting to Clicks on form elements

[`PdfActivity`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-activity/index.html) and [`PdfFragment`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-fragment/index.html) include fully featured support for form filling. The default on-click behavior of form elements depends on their type:

- Taps on push buttons lead to an [execution of the `Action`](https://www.nutrient.io/guides/android/annotations/pdf-actions/), which is set on the form element.

- Taps on signature fields [start the signing flow](https://www.nutrient.io/guides/android/features/digital-signatures.md).

- Taps on other fields lead to form element selection as well as to entering the form editing mode.

Default tap behavior can be fully customized by registering [`OnFormElementClickedListener`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui.special_mode.manager/-form-manager/-on-form-element-clicked-listener/index.html) via [`addOnFormElementClickedListener()`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-fragment/add-on-form-element-clicked-listener.html) on [`PdfFragment`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-fragment/index.html):

### KOTLIN

```kotlin

fragment.addOnFormElementClickedListener { formElement ->
    when {
        formElement.type == FormType.SIGNATURE -> {
            // Implement custom signature flow here....

            // By returning `true`, you intercept the event and prevent PSPDFKit from showing the signature picker itself.
            true
        }
        formElement.type == FormType.PUSHBUTTON -> {
            // Implement custom push button click handling....

            // By returning `true`, you intercept the event and prevent PSPDFKit from executing the button's action.
            true
        }
        else -> {
            // This click event isn't interesting. Return `false` to let PSPDFKit handle this click event.
            false
        }
    }
}

```

### JAVA

```java

fragment.addOnFormElementClickedListener(formElement -> {
    if (formElement.getType() == FormType.SIGNATURE) {
        // Implement custom signature flow here....

        // By returning `true`, you intercept the event and prevent PSPDFKit from showing the signature picker itself.
        return true;
    } else if (formElement.getType() == FormType.PUSHBUTTON) {
        // Implement custom push button click handling....

        // By returning `true`, you intercept the event and prevent PSPDFKit from executing the button's action.
        return true;
    }

    // This click event isn't interesting. Return `false` to let PSPDFKit handle this click event.
    return false;
});

```








## Reacting to form element selection

Most form elements, with the exception of buttons and signature fields, can be selected for interactive editing. You can get notified about this via [`OnFormElementSelectedListener`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui.special_mode.manager/-form-manager/-on-form-element-selected-listener/index.html) and [`OnFormElementDeselectedListener`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui.special_mode.manager/-form-manager/-on-form-element-deselected-listener/index.html), both of which can be registered on [`PdfFragment`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-fragment/index.html).

Form selection also leads to entering the form element editing mode. You can react to its lifecycle by registering [`OnFormElementEditingModeListener`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui.special_mode.manager/-form-manager/-on-form-element-editing-mode-change-listener/index.html) on [`PdfFragment`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-fragment/index.html). If you want to learn more, refer to the [custom form editing UI](https://www.nutrient.io/guides/android/customizing-the-interface/using-form-ui-within-fragment.md) guide that describes how to use this listener to integrate Nutrient’s form filling UI when using custom activities built around [`PdfFragment`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-fragment/index.html).







For more information on how Nutrient Android SDK implements forms, please see our [introduction to forms](https://www.nutrient.io/guides/android/forms.md) guide.
---

## Related pages

- [Analytics](/guides/android/features/analytics.md)
- [Analytics events](/guides/android/events-and-notifications/events.md)
- [Events and notifications](/guides/android/events-and-notifications.md)
- [Annotation events and notifications](/guides/android/events-and-notifications/annotation.md)
- [Text selection events and notifications](/guides/android/events-and-notifications/text-selection.md)
- [PDF viewer events](/guides/android/miscellaneous/document-listeners.md)

