Orbeon Forms
  • Getting started
  • Installation
    • Logging
    • Configuration banner
    • Docker
    • Azure
    • Tomcat
    • WildFly
    • WebSphere
    • WebLogic
    • GlassFish
    • Caches
    • Replication
    • Upgrading
  • Configuration
    • Properties
      • General
        • HTTP client
      • Form Runner
        • Detail page
          • Attachments
          • Email properties
          • PDF
          • Table of contents
        • Persistence
        • Summary page
      • Form Builder
      • XForms
    • Advanced
      • Workflows
      • Session management
      • State handling
      • Client-side error handling
      • Clustering and High Availability
      • Configuring a Form Runner eXist database
      • Creating a production WAR
      • Environments
      • JavaScript and CSS assets
      • Limiter filter
      • Run modes
      • Security
        • Content-Security-Policy header
      • SAP Hybris Module
      • XForms logging
    • Troubleshooting
      • Troubleshooting with the orbeon.log
      • Memory and threads
      • Relational database logging
      • Misc
  • Form Builder
    • Form settings
      • Time window
    • Form editor
      • Form area
      • Toolbox
      • Buttons bar
      • Control settings
      • Dependent fields and sections
      • Validation
      • Choices editor
      • Publishing
      • Cut, copy and paste
      • Section and grid settings
      • Section settings
      • Grid settings
      • Quick control search
      • Repeat settings
      • Repeated grids
      • Undo and redo
      • Keyboard shortcuts
    • Formulas
      • Examples of formulas
      • Formulas inspector
      • Formulas console
    • Summary page
    • Form localization
    • Advanced
      • Edit source
      • Services and actions
        • HTTP services
        • Database services
        • Simple Actions
        • Action Syntax
        • Action Syntax examples
        • Synchronizing repeated content
      • Testing a form in web mode
      • Testing PDF production
      • Testing offline functionality
      • Email Settings dialog
      • Field-level encryption
      • Messages
      • Section templates
      • Template syntax
      • XML Schemas support
      • Extensibility
        • Extension API
        • Integration
        • Toolbox component metadata
  • Form Runner
    • Overview
      • Terminology
    • Pages
      • Landing page
      • Published Forms page
      • Forms Admin page
      • Summary page
    • Components
      • Alert dialog
      • Attachment
      • Autocomplete
      • Captcha
      • Character counter
      • Checkbox input
      • Currency
      • Date
      • Dropdown date
      • Static and dynamic dropdown
      • Error summary
      • Grid
      • Handwritten signature
      • Hidden field
      • Image
      • Image annotation
      • Image attachment
      • Number
      • Open selection
      • Repeater
      • Formatted Text / Rich Text Editor
      • Section
      • Single-selection tree
      • Source code editor
      • Time
      • US phone
      • US state
      • Video
      • Video attachment
      • Wizard
      • XForms inspector
      • Yes/No answer
    • Features
      • Automatic calculations dependencies
      • Datasets
      • Excel and XML import
      • Excel and XML export
      • Summary page Excel Export
      • Form definitions and form data Zip Export
      • Purging historical data
      • Lease
      • Localization
      • Supported languages
      • Mobile support
      • Multitenancy
      • Form Runner navigation bar
      • PDF production
        • Automatic PDF
        • Automatic PDF header and footer configuration
        • PDF templates
      • Responsive design
      • Revision history
      • S3 storage
      • Simple data migration
      • TIFF production
      • Versioning
      • Wizard view
      • Workflow stage
    • Persistence
      • Using a relational database
      • Relational database schema
      • Purging old data using SQL
      • Auditing
      • Autosave
      • Database support
      • Flat view
    • Linking and embedding
      • Linking
      • Java Embedding API
      • JavaScript Embedding API
      • Liferay full portlet
      • Liferay proxy portlet
      • Securing Form Runner access
      • Form Runner offline embedding API
      • Angular component
      • React component
    • Access control and permissions
      • Users
      • Login & Logout
      • Deployed forms
      • Form fields
      • Editing forms
      • Owner and group member
      • Organizations
      • Scenarios
      • Token-based permissions
    • Styling
      • CSS
      • Grids CSS
      • Automatic PDF styling and CSS
    • APIs
      • Authentication of server-side service APIs
      • Persistence API
        • CRUD API
        • Search API
        • List form data attachments API
        • Form Metadata API
        • Lease API
        • Reindexing API
        • Caching
        • Versioning
        • Revision History API
        • Zip Export API
        • Custom persistence providers
      • Other APIs
        • Connection context API
        • Duplicate form data API
        • File scan API
        • Form Runner JavaScript API
        • Generate XML Schema API
        • PDF API
        • Publish form definition API
        • Run form in the background API
      • Data formats
        • Form data
        • Date and time
        • Form definition
    • Architecture and integration
      • Architecture
      • Access form data
      • Integration
    • Advanced
      • Buttons and processes
        • Simple process syntax
        • Core actions
        • Form Runner actions
          • Save action
          • Send action
          • Email action
        • XForms actions
        • Predefined buttons, processes and dialogs
        • Summary page buttons and processes
      • Custom dialogs/model logic
      • Services
      • Singleton form
      • Monitoring HTTP requests
  • XForms
    • Core
      • Attribute Value Templates (AVTs)
      • Binds
      • Validation
      • Variables
      • Keyboard focus
      • XForms JavaScript API
      • Error handling
        • Detailed behavior
      • Model-Bind variables
      • XForms 2.0 support
    • Events
      • Standard support
      • UI refresh events
      • Keyboard events
      • Extension events
      • Extension context information
      • Other event extensions
    • Actions
      • Repeat, insert and delete
      • Scripting actions
      • Extensions
    • Controls
      • Label, hint, help
      • Input
      • Output
      • Text area
      • Button
      • Upload
      • Dialog
    • Submission
      • Standard support
      • JSON support
      • Asynchronous submissions
      • Caching extension
      • Other submission extensions
    • XPath
      • Type annotations
      • Expression analysis
      • Tips
      • Compatibility
      • Standard functions
      • Maps and arrays Functions
      • Extension functions
        • Core functions
        • Utility functions
        • Model functions
        • Controls functions
        • XML functions
        • JSON functions
        • HTTP functions
        • Form Runner functions
        • Other functions
        • Deprecated functions
    • XBL components
      • FAQ
      • Guide
        • XBL Tutorial
        • Bindings
        • XForms models
        • Including content
        • Event handling
        • Conventions
        • Map XBL example
        • Learning from existing components
      • Advanced topics
        • XBL Modes
        • JavaScript companion classes
        • XBL library
        • Extensions
        • Attachment controls
    • XForms tutorial
      • Introduction
      • Installation
      • The Hello application
      • The Bookcast application
        • The basic app
        • Database access
        • Polishing the app
        • Adding a feed
    • Using XForms from Java apps
  • XML Platform
    • Page Flow Controller
      • Basics
      • XML submission
      • Navigating between pages
      • Paths and matchers
      • Other configuration elements
      • Typical combinations of page model and page view
      • Examples
      • Authorizing pages and services
    • Processors
      • URL generator
      • Request generator
      • PDF to image converter
    • Resources
      • Resource managers
      • Setting up an external resources directory
    • Other
      • Binary and text documents
  • FAQ
    • Licensing
    • PE and Dev Support
    • Form Builder and Form Runner
    • Resources and support
    • Other technical questions
  • Contributors
    • Automated tests
    • Building Orbeon Forms
    • Localizing Orbeon Forms
    • Validation functions
    • Contributor License Agreement
  • Release notes
    • Orbeon Forms 2022.1.9
    • Orbeon Forms 2024.1.1
    • Orbeon Forms 2023.1.7
    • Orbeon Forms 2024.1
    • Orbeon Forms 2023.1.6
    • Orbeon Forms 2023.1.5
    • Orbeon Forms 2021.1.11
    • Orbeon Forms 2022.1.8
    • Orbeon Forms 2023.1.4
    • Orbeon Forms 2023.1.3
    • Orbeon Forms 2023.1.2
    • Orbeon Forms 2022.1.7
    • Orbeon Forms 2023.1.1
    • Orbeon Forms 2023.1
    • Orbeon Forms 2022.1.6
    • Orbeon Forms 2021.1.10
    • Orbeon Forms 2022.1.5
    • Orbeon Forms 2021.1.9
    • Orbeon Forms 2022.1.4
    • Orbeon Forms 2022.1.3
    • Orbeon Forms 2021.1.8
    • Orbeon Forms 2022.1.2
    • Orbeon Forms 2022.1.1
    • Orbeon Forms 2022.1
    • Orbeon Forms 2021.1.7
    • Orbeon Forms 2021.1.6
    • Orbeon Forms 2021.1.5
    • Orbeon Forms 2021.1.4
    • Orbeon Forms 2021.1.3
    • Orbeon Forms 2021.1.2
    • Orbeon Forms 2021.1.1
    • Orbeon Forms 2021.1
    • Orbeon Forms 2020.1.6
    • Orbeon Forms 2019.2.4
    • Orbeon Forms 2019.1.2
    • Orbeon Forms 2018.2.5
    • Orbeon Forms 2018.1.4
    • Orbeon Forms 2020.1.5
    • Orbeon Forms 2020.1.4
    • Orbeon Forms 2020.1.3
    • Orbeon Forms 2020.1.2
    • Orbeon Forms 2019.2.3
    • Orbeon Forms 2020.1.1
    • Orbeon Forms 2020.1
    • Orbeon Forms 2019.2.2
    • Orbeon Forms 2019.2.1
    • Orbeon Forms 2019.1.1
    • Orbeon Forms 2019.2
    • Orbeon Forms 2019.1
    • Orbeon Forms 2018.2.4
  • Release history
  • Use cases
  • Product roadmap
  • Index of features
Powered by GitBook
On this page
  • Children pages
  • Introduction
  • validate
  • wizard-update-validity
  • pending-uploads
  • rollback
  • save
  • email
  • send
  • set-data-status
  • set-workflow-stage
  • navigate
  • relinquish-lease
  • success-message and error-message
  • confirm
  • open-rendered-format
  • callback
  • Action
  • Registering a callback function
  • Switching modes
  • new-to-edit
  • edit-to-new
  • Other actions
  1. Form Runner
  2. Advanced
  3. Buttons and processes

Form Runner actions

PreviousCore actionsNextSave action

Last updated 3 months ago

Children pages

Introduction

These actions are specific to Form Runner. They allow you to validate, save and send data, in particular.

validate

Validate form data.

  • parameters

    • level: validation level to check: one of error, warning, or info

    • property: specifies a boolean property which, if false, skips validation (used for backward compatibility) [Orbeon Forms 4.2 only, removed in Orbeon Forms 4.3]

  • result

    • success if data is valid

    • failure if data is invalid

[SINCE Orbeon Forms 2016.3]

When the validation mode is set to explicit, first update the validity of all controls with explicit validation and perform a refresh.

wizard-update-validity

[SINCE Orbeon Forms 2016.3]

When the validation mode is set to explicit, first update the validity of all wizard pages up to the current wizard page included.

pending-uploads

Check whether there are pending uploads.

  • parameters

    • none

  • result

    • success if there are no pending uploads

    • failure if there are pending uploads

rollback

[SINCE Orbeon Forms 2017.2]

Rollback some of the changes that have taken place during the current process.

  • parameters

    • changes: must be "in-memory-form-data"

At the beginning of a top-level process, the current state of:

  • in-memory form data

  • data status (see the set-data-status action)

is temporarily saved.

Upon running the rollback action, that stat is restored.

This means, for example, that if the instance data was changed due to actions such as:

  • xf:setvalue

  • save (which updates paths to attachments)

then the state of the data is restored to what it was prior to running the current top-level process.

Example:

xf:setvalue(ref = "my-section/my-name", value = "'Sam'")
then rollback(changes = "in-memory-form-data")

Limitations:

  • This does not work across suspend / resume boundaries.

  • There is no rollback at the database level.

save

email

send

set-data-status

[SINCE Orbeon Forms 4.7]

Set the status of the in-memory form data.

  • parameters

    • status: specifies the status of the data

      • safe: mark the data as in initial state or saved (default)

      • unsafe: mark the data as modified by the user and not saved

This action can be useful in conjunction with send. Upon successfully sending the data, if the data is not in addition saved to the local database, this action can be used to indicate to the user that the data is safe.

set-workflow-stage

[SINCE Orbeon Forms 2020.1]

  • parameters

    • name: the new workflow stage (is an XPath value template)

For instance:

  • You can have an approve process that sets the current workflow stage with set-workflow-stage(name = "approved")

navigate

Navigate to an external page via client-side GET.

  • parameters

    • uri: an XPath value template which specifies the URL to navigate to

    • property: specifies a property containing the URL to navigate to

    • by default, try to guess based on the parameter

    • target

      • SINCE Orbeon Forms 2019.1

      • where to display the location

      • _self|_blank or name of the browsing context

    • show-progress

      • [SINCE Orbeon Forms 2022.1]

      • Boolean indicating whether to keep the loading indicator while the navigation is in progress

      • Optional, if missing defaults to false

      • Can be an XPath Value Template

You can also use the navigate action to execute JavaScript:

navigate(uri = "javascript:myFunction()")

[SINCE Orbeon Forms 4.6]

The URL value, whether directly or via a property, can be an XPath Value Template, which runs in the context of the root element of the main form instance:

navigate(uri = "http://example.org/{xxf:get-request-parameter('bar')}/{.//code}")

relinquish-lease

[SINCE Orbeon Forms 2017.2.1]

success-message and error-message

  • success-message: show a success message

    • parameters

      • message: message to show (is an XPath value template)

      • resource: resource key pointing to the message

  • error-message: show an error message

    • parameters

      • message: message to show (is an XPath value template)

      • resource: resource key pointing to the message

      • appearance: [SINCE Orbeon Forms 2021.1] This parameter is optional. If present, the value must be either dialog or ephemeral. If missing, the dialog is implied.

        • dialog: the message is shown in the modal dialog

        • ephemeral: the message is shown at the bottom of the form, and disappears when users perform an action

[SINCE Orbeon Forms 4.7] The value of the message parameter and the message to which points the resource key in the resource parameter are interpreted as an XPath Value Template.

confirm

[SINCE Orbeon Forms 4.5]

Show a confirmation dialog. If the user selects "No", the current process is aborted. If the user selects "Yes", the current process is resumed.

  • parameters

    • message: message to show (is an XPath value template)

    • resource: resource key pointing to the message

Example of use:

save
then confirm
then suspend
then send("oxf.fr.detail.send.success")'/>

NOTE: The confirm action is not synchronous, so the process must be suspended right after or the process will continue before the dialog is shown to the user.

You can use a specific confirmation message with the message parameter:

save
then confirm(message = "Please confirm that you would like to submit your data.")
then suspend
then send("oxf.fr.detail.send.success")'/>

You can also override the default confirmation message:

<property
  as="xs:string"
  name="oxf.fr.resource.*.*.en.detail.messages.confirmation-dialog-message"
  value="Are you sure you want to proceed?"/>

You can also use a path to a resource, including a custom resource. For example"

save
then confirm(resource = "acme-resource-1")
then suspend
then send("oxf.fr.detail.send.success")'/>

If you have defined custom resources as follows:

<property
  as="xs:string"
  name="oxf.fr.resource.*.*.en.detail.messages.acme-resource-1"
  value="Resource 1 in English"/>

<property
  as="xs:string"
  name="oxf.fr.resource.*.*.fr.detail.messages.acme-resource-1"
  value="Resource 1 en français"/>

Note that only resources under detail.messages are searched, and the resource name cannot contain further .s.

open-rendered-format

[SINCE Orbeon Forms 2017.1]

Depending on the value of the parameter, it generates a view of the current form in the specified format, and sends the generated PDF or TIFF to the browser. This action will attempt to have the browser show the generated PDF or TIFF, and do so in a new browser tab or window. However, not all browsers support this completely:

  • Showing the PDF or TIFF inline:

    • PDF – All browsers will show the PDF inline directly, except Edge which will first ask users if they want to save or open it.

    • TIFF – Browsers other than Safari don't know how to show a TIFF file inline, and thus will just download the file.

    • With Chrome, IE, and Edge the PDF or TIFF will show in a new window.

    • With Safari and Firefox the PDF or TIFF will show in the current window.

[SINCE Orbeon Forms 2021.1.3]

Two new formats are supported:

  • xml-form-structure-and-data

    • Export an XML file containing information about the structure of the form as well as the current data.

    • This file format can also be used for later import.

    • The xml-export button and default process run open-rendered-format(format = "xml-form-structure-and-data").

  • excel-with-named-ranges

    • Export an Excel file approximating the structure of the form as well as the current data.

    • This file format can also be used for later import.

    • The excel-export button and default process run open-rendered-format(format = "excel-with-named-ranges").

The following parameters allow controlling hints, alerts, and required controls in the PDF:

  • show-hints

    • defaults to the oxf.fr.detail.static-readonly-hint property, which itself defaults to false

    • when true, shows hints in the PDF

  • show-alerts

    • defaults to the oxf.fr.detail.static-readonly-alert property, which itself defaults to false

    • when true, shows alerts in the PDF

  • show-required

    • defaults to the oxf.fr.detail.static-readonly-required property, which itself defaults to false

    • when true, style required controls in the PDF

[SINCE Orbeon Forms 2018.1]

The following parameters allow controlling the use of PDF templates:

  • use-pdf-template

    • This defaults to true if there is at least one PDF template attached to the form, false otherwise.

    • If at least one PDF template is available, the default is to use one of the PDF templates. But if use-pdf-template = "false", then use of any PDF template is disabled and the automatic PDF is produced.

  • pdf-template-name

    • This contributes to selecting a specific PDF template.

    • If pdf-template-name specifies a name, such as with pdf-template-name = "archive", the list of available PDF templates is reduced to those having an exactly matching name. If no matching name is found, an error is raised.

  • pdf-template-lang

    • This contributes to selecting a specific PDF template.

    • If pdf-template-lang specifies a language, such as with pdf-template-lang = "fr", the list of available PDF templates as reduced by pdf-template-name is used to find a PDF template with a matching language. If no matching language is found, an error is raised.

    • If pdf-template-lang is empty or missing:

      • The PDF template with the current form language is used, if there is a match.

      • If there is no match, the first available PDF template is used.

Example:

<property as="xs:string"  name="oxf.fr.detail.process.pdf.*.*">
    open-rendered-format(format = "pdf", show-alerts = "false", show-hints = "true")
</property>

The output contains alerts and/or hints if one of the values is set to "true". For example:

callback

Action

This action allows you to run a callback function on the client (in JavaScript) after the current process has completed.

The following parameters are supported:

  • name: name with which the callback function or functions have been registered with

Example:

<property as="xs:string"  name="oxf.fr.detail.process.save-final.*.*">
    require-uploads
    then validate-all
    then save
    then new-to-edit
    then callback(name = "my-saved-callback")
    then success-message("save-success")
    recover error-message("database-error")
</property>

Registering a callback function

You register a callback function on the client when embedding a form in a page. For example:

ORBEON.fr.API.embedForm(
    document.getElementById("my-container-element"),
    "/orbeon",
    "human-resources",
    "job-application",
    "new"
)
.then((form) => {
    console.log("`embedForm()` successfully loaded the form");
    form.addCallback("my-saved-callback", () => console.log("The data was successfully saved!"))
})
.catch((e) => {
  console.log("`embedForm()` returned an error");
  console.log(e);
});

See also:

Switching modes

new-to-edit

[SINCE Orbeon Forms 2017.1]

  • If possible, switch the detail page's URL from new mode to edit mode.

  • Before this action, this was done automatically as part of the save action.

  • If the form is not in new mode, this action has no effect.

  • If permissions do not allow editing the data, this action has no effect.

  • This preserves (and therefore does not reset) the current form data.

edit-to-new

[SINCE Orbeon Forms 2023.1.4]

  • If possible, switch the detail page's URL from edit mode to new mode.

  • This also creates a fresh document id.

  • If the form is not in edit mode, this action has no effect.

  • If permissions do not allow creating new data, this action has no effect.

  • This preserves (and therefore does not reset) the current form data.

Other actions

  • captcha:

    • [UNTIL Orbeon Forms 2023.1] Trigger the captcha.

  • collapse-all: Collapse all sections (when not using the wizard view).

  • expand-all: Expand all sections (when not using the wizard view).

  • expand-invalid: [SINCE Orbeon Forms 2018.1] This action expands all the sections that contain an error. Out-of-the-box, this action is used by the require-valid process, in turn called when validating data, say before save, so users can see all the sections that contain an error.

  • result-dialog: Show the result dialog.

  • review, edit: Navigate to these Form Runner pages.

  • show-relevant-errors:

    • [SINCE Orbeon Forms 2018.1]

    • This is the new name for the visit-all action.

  • summary: Navigate to this Form Runner page (a predefined process since 4.7).

  • unvisit-all:

    • Mark all controls as not visited.

  • visit-all:

    • [DEPRECATED SINCE Orbeon Forms 2018.1]

    • See show-relevant-errors instead.

  • wizard-prev: Navigate the wizard to the previous page.

  • wizard-next: Navigate the wizard to the next page.

The documentation for the save action is on a .

The documentation for the email action is on a .

The documentation for the send action is on a .

See also .

You can also use a to dynamically determine the name of the workflow stage, as in set-workflow-stage(name = "{if (//expense > 10000) then 'review-needed' else 'approved'}")

Also see the .

Setting this parameter to true is particularly useful if you have enabled the for the button that triggers this process, and you would like to prevent double submissions or users from editing the form while the navigation is in progress

The relinquish-lease action will, if the current user has a lease on the data being currently edited, relinquish that lease. The action has no effect if the , or if the current user doesn't own the lease.

In most cases you'll want to use this action in conjunction with or to release a potential lease the user might have before you take that user to another page. This way other users will be able to access the current data without having to wait for the lease to expire.

html: "true" if the message is HTML (default is "false")

html: "true" if the message is HTML (default is "false")

html: "true" if the message is HTML (default is "false")

This action takes a format parameter, whose value must be either pdf or tiff, as in open-rendered-format(format = "pdf"). In addition to the content parameter, this action supports the parameters documented in .

Opening the PDF or TIFF in a :

See also .

This action is no longer needed, and running it has no effect.

This shows all "relevant errors". When using the in lax and strict` mode, this shows errors to show for all available wizard pages. Errors for controls on non-available pages are not shown.

save action
send action
email action
separate page
separate page
separate page
value template
[SINCE Orbeon Forms 2023.1]
[SINCE Orbeon Forms 2023.1]
[SINCE Orbeon Forms 2023.1]
[SINCE Orbeon Forms 2023.1]
Testing PDF production
[SINCE Orbeon Forms 2023.1]
[SINCE Orbeon Forms 2023.1]
[SINCE Orbeon Forms 2024.1]
wizard view
send(replace ="all")
navigate
lease isn't enabled
embedForm() API
new tab or browser window
fr:workflow-stage-value() function
Confirmation dialog
PDF output with alerts and hints
the oxf.fr.detail.warn-when-data-unsafe property
modal indicator
Controlling the format
Adding and removing process callback functions