# Messages

[\[SINCE Orbeon Forms 2023.1\]](https://doc.orbeon.com/release-notes/orbeon-forms-2023.1)

![Messages dialog](https://4129616727-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LEkBiSDvlXs3VWiO0Zu%2Fuploads%2Fgit-blob-5c13ea525a98ef08b62743883d932bf716cc49d5%2Fmessages.png?alt=media)

## Purpose

Some of the [Form Runner actions](https://doc.orbeon.com/form-runner/advanced/buttons-and-processes/actions-form-runner) display messages to users. For instance, when a form is saved, a message is displayed to confirm that the form was saved successfully. The Messages dialog allows you to customize those messages directly in Form Builder, instead of using properties such as `oxf.fr.resource.*.*.en.detail.messages.save-success`.

## Usage

You can open the Messages dialog by clicking on the "Messages" button, under the "Advanced" tab, in the toolbox.

![](https://4129616727-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LEkBiSDvlXs3VWiO0Zu%2Fuploads%2Fgit-blob-6792fc8450886ca68dd55af58966e8f411c03d84%2Fadvanced-menu.png?alt=media)

Each message must have a language, a name, and a value.

The message name can be one of the pre-defined names present in [Form Runner's `resources.xml`](https://github.com/orbeon/orbeon-forms/blob/master/form-runner/jvm/src/main/resources/apps/fr/i18n/resources.xml) (e.g. `save-success` or `upload-error`) or a custom name, which can be entered by selecting "Other".

When a message is defined in the Messages dialog, it overrides any message defined in a property.

## Supported actions

The following [Form Runner actions](https://doc.orbeon.com/form-runner/advanced/buttons-and-processes/actions-form-runner) take a message as parameter:

* [`confirm`](https://doc.orbeon.com/form-runner/advanced/buttons-and-processes/actions-form-runner#confirm)
* [`success-message`](https://doc.orbeon.com/form-runner/advanced/buttons-and-processes/actions-form-runner#success-message-and-error-message)
* [`error-message`](https://doc.orbeon.com/form-runner/advanced/buttons-and-processes/actions-form-runner#success-message-and-error-message)

For example, you can reference the pre-defined message `save-success` by calling the following action:

```
success-message(resource = "save-success")
```

Or simply:

```
success-message("save-success")
```

## Custom messages

When overriding existing processes or introducing custom processes in the properties, you can also reference custom messages that are not used internally by Form Runner. You can do so by selecting "Other" in the name dropdown and entering a custom name.

For example, you might want to define a custom `email-and-save` process to email and save your form, and display a custom `sent-and-saved` message (defined via the Messages dialog) upon success. This allows you to use a more specific message than the pre-defined `save-success` message.

```xml
<property as="xs:string" name="oxf.fr.detail.buttons.acme.foo">
    summary clear pdf review email-and-save
</property>

<property as="xs:string"  name="oxf.fr.detail.process.email-and-save.acme.foo">
    email(template = "email-template-name")
    then save
    then success-message("sent-and-saved")
</property>

<property
    as="xs:string"
    name="oxf.fr.resource.*.*.en.buttons.email-and-save"
    value="Email &amp; save"/>
```

## See also

* Blog post: [Customizing Form Runner messages directly from Form Builder](https://blog.orbeon.com/2023/10/customizing-form-runner-messages.html)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.orbeon.com/form-builder/advanced/messages.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
