Friday, May 14, 2021

Making one of two fields required

Say you have a form that contains 2 fields, a and b, and you want users to provide a value for a or for b; it is ok if they provide values for both a and b, but it isn't ok if they leave both a and b empty. A practical example would be a form where you have 2 fields: "Home phone number" and "Mobile phone number", and you need users to leave at least one of those two numbers.

In Form Builder, with the UI shown below, you can declare a field to be required (the "Yes" radio button), or not required, which is the default (the "No" radio button), but you can also write a formula which determines dynamically whether the field is required (the "Formula" radio button), and this is what allows you to handle a case as the one we're considering here.

Say your two fields are named home-phone and mobile-phone. You want to say that the home phone is required if no mobile phone was provided. You can do this with the formula xxf:is-blank($mobile-phone). Conversely, the formula for the mobile phone will be xxf:is-blank($home-phone).

At runtime, the asterisk to the left of the label also updates as you interact with the form, becoming:

  • A red asterisk if a value is required, and none is provided
  • A black asterisk if a value is required, and one is provided
  • No asterisk if a value is not required, because another phone number was provided

Friday, April 30, 2021

Orbeon Forms 2020.1.3 PE

Today we released Orbeon Forms 2020.1.3 PE!

For details, see the release notes.

You can download the latest version of Orbeon Forms from the downloads page.

We hope you enjoy this release!

Monday, March 29, 2021

Making the date picker keyboard accessible

Selecting a date entirely with the keyboard

The Orbeon Forms date field allows users to type a date, but also to select a date using a date picker. While most people are used to interacting with date pickers using a mouse, touchpad, or a touch interface, the Orbeon Forms date picker also supports doing so with the keyboard:

  1. Tab to the date field, if the focus is not already on that field.
  2. Hit the ↓ Down arrow key to open the date picker.
  3. Use arrows keys to navigate through the calendar; for instance hitting the ↓ Down arrow key takes you to following week.
  4. Press ↵ Enter to select the highlighted date.

This makes the date picker more accessible, but also faster to use for power users, especially in cases where you want to enter a relative date, like "a week from now", or "a month from now, skipping to Monday if that date falls on a weekend". Using the keyboard to select a date in the date picker has been a feature of the product since Orbeon Forms 2019.1.

Tuesday, February 16, 2021

Orbeon Forms 2019.2.3 PE

Today we released the Orbeon Forms 2019.2.3 PE maintenance release!

For details, see the release notes.

You can download the latest version of Orbeon Forms from the downloads page.

We hope you enjoy this release!

Monday, February 1, 2021

Orbeon Forms 2020.1.1 PE and Orbeon Forms 2020.1.1 CE

Today we released Orbeon Forms 2020.1.1 PE and Orbeon Forms 2020.1.1 CE!

For details, see the release notes.

You can download the latest version of Orbeon Forms from the downloads page.

We hope you enjoy this release!

Orbeon Forms can now determine files' mediatype based on the extension

When you attach a file to a form, as you might expect, the browser sends the content of the file to Orbeon Forms, but it also sends information about the file, including the file name, file size, and a description of the type of file it is sending called media type or MIME type. For instance, if you upload a JPEG image, the browser will tell the server that the media type of the file is image/jpeg.

However, there are times when the browser doesn't know the media type for a given file, and either doesn't provide that information to the server, or provides a generic media type, such as application/octet-stream. In those cases, starting in version 2020.1, Orbeon Forms infers the media type based on the file extension, thus increasing the likeliness that you end up with a correct media type.

For more on this, see the documentation section Mediatype determination.

Monday, January 25, 2021

Adding keyboard shortcuts to Form Builder

We believe that it is important for us to make Form Builder as easy as possible to use with a keyboard, this to improve:

  • accessibility,
  • the user experience for power users.

In Orbeon Forms 2020.1, we've started adding support for a few keyboard shortcuts for cut/copy/paste, save, undo/redo.

As you can see, this initial set is quite limited, but consider it as a start. We're planning to add more in the future, so, if you have a particular action for which you'd like us to add a keyboard shortcut for, please let us know.