---
category: [Administration & Integrations, Platform and Product Extensions, Platform and Product Extensions/Integration, Administration & Integrations/Custom Integrations & Apps, Platform and Product Extensions/Workday Extend]
keyword: [Extend, Presentation Components, widgets, tags, UI components]
nav: wcp_docs
parent_url: /wcp_docs/
title: pageActionButton
layout: subsection
wd_wcptag: pageActionButton
---

<a id="section_N10021_N1001E_N10001"></a>
Creates a button that enables users to perform actions on an edit page.

Use `pageActionButton` only on edit pages that use PMD Scripting.

Jump to:

-   [Attributes](/wcp_docs/jje1617899729875.html#section-attributes)
-   [PMD Scripting Events](/wcp_docs/jje1617899729875.html#section-pmd-scripting-events)


## <a id="section_usage"></a>Usage

## <a id="section_csp_qkk_3pb"></a>onClick Event Handling

Use `pageActionButton` to display a button that executes an `onClick` event handler.

Unlike the `button` widget, the `pageActionButton` widget:

-   Performs actions on the current page with the `onClick` event handler.
-   Doesn't provide the ability to link to another page or URL.
-   Displays only as a gray button. You can't customize its display style.
-   Enables dynamic binding only on the `visible` attribute.


This sample `pageActionButton` updates a text value when a user clicks the button:

```
{
 "type": "pageActionButton",
 "id": "myPageActionButton",
 "visible": true,
 "label": "Click Me!",
 "onClick": "<% myText.value = 'Yes' %>"
},
{
 "type": "text",
 "id": "myText",
 "enabled": "false",
 "label": "Have you clicked the pageActionButton yet?",
 "value": "<% 'No' %> "
}
```

## <a id="section-mobile-support"></a>Mobile Support

Android, iOS

## <a id="section-attributes"></a>Attributes

-   <b>id</b>

    Data type: stringScript

    Unique identifier used to reference this widget from other tags.

    Notes:

    -   The `id` must start with a letter.
    -   The `id` must be unique per page.
    -   To enable other widgets to reference this widget `id`, place this widget before the other widgets on the PMD. The PMD validation returns an "Undefined variable" error if it doesn't find a previously defined `id` in the PMD.
    -   Workday recommends that you include the `id` in your widgets and tag definitions.

-   <b>label</b>

    Data type: stringScript

    The text that displays on the button.

-   <b>render</b>

    Data type: booleanScript

    Indicates whether or not this tag turns into a widget. If true, this tag renders as a widget on the page. If false, the page doesn't add this tag or its children. The default is true.

    Unlike the `visible` attribute, if `render` is false, other tags on the page can't reference this tag or widget on edit pages. On view pages, a tag cannot reference other tags, regardless of the `render` attribute value.

-   <b>sortOrder</b>

    Data type: stringScript

    When you set `sorted` to true on the `section` or `fieldSet` parent of this widget, the `sortOrder` attribute determines the order of this widget within its parent. The sort order is relative to the siblings of the widget.

    Typical values are "a", "b", "c", and so on. Example: The widget with `"sortOrder": "a"` displays before the widget with `"sortOrder": "b"`.

    <b>Note:</b> The `sortOrder` doesn't apply to sorting data on the widget. `sortOrder` only applies to the placement order of the widgets within the parent widget.

-   <b>visible</b>

    Data type: booleanScript

    If true, the widget generated by this tag is visible. If false, this tag and its children tags aren't visible. This tag provides the ability to display or hide the widget dynamically based on user interactions on the page. The default is true. Unlike the `render` attribute, the generated widget persists on the page even when `visible` is false.

    <b>Notes:</b>

    -   When the widget or field you’re hiding changes on the page, you must include it inside a `fieldSet`.
    -   When the `visible` attribute is false for this widget on an edit page, the outbound endpoint doesn't include the `valueOutBinding` data of the widget in the outbound payload. To include the `valueOutBinding` data in the payload, use the `onSend` event handler.



## <a id="section-pmd-scripting-events"></a>PMD Scripting Events

-   <b>onClick</b>

    Triggers when the user clicks the `pageActionButton` widget on an edit page.



### Related Information

[button](/wcp_docs/irz1512515858494.html)

