Thursday, March 28, 2019

Form-level and control-level settings

With Orbeon Forms, some form controls have specific settings. For example, a Number field can be configured to show 2 digits after the decimal point. In the past, these settings could be configured in two ways:
  • Using configuration properties, which could apply to a single form or or multiple forms.
  • Using attributes in the source code of the form definition.
Neither solution was perfect. With Orbeon Forms 2018.2, we have improved this and you can now easily configure these settings through the Form Builder user interface:
  • for all such controls appearing in the form definition,
  • or for an individual form control in the form definition, in which case that local setting overrides the more general setting.


When neither type of setting is present, the configuration properties still apply.

This allows you to pick general defaults and change them as needed. For example, in general number fields have 2 digits after the decimal point, but in case a couple number fields need a specific setting, you can do that easily.

With Orbeon Forms 2018.2, this applies to the following built-in form controls:
  • The "Number" and "Currency" fields support setting:
    • a prefix
    • a suffix
    • the number of digits after the decimal point
    • the decimal separator
    • the thousands grouping separator
    • rounding options
    • the default field width ("full" or "natural")
  • The "Date", "Time" and "Date and Time" fields support setting:
    • the default field width ("full" or "natural")
The nice part is that this is done entirely through the Orbeon Forms component system. This means that it is possible to create new form controls which export metadata and editors which Form Builder will show in the "Control Settings" and the "Form Settings" dialogs.

For more details, see the documentation.

We hope you will like this feature Orbeon Forms 2018.2.

Monday, March 4, 2019

Orbeon Forms 2018.2.2 PE

Today we released Orbeon Forms 2018.2.2 PE. This update to Orbeon Forms 2018.2.1 PE contains bug-fixes and is recommended for all Orbeon Forms 2018.2 PE and Orbeon Forms 2018.2.1 PE users.

This release addresses the following issues since Orbeon Forms 2018.2.1 PE:

Form Runner:
  • Regressions fixes
    • Minimal repeated section - remove button doesn't work (#3948)
    • Can't read encrypted data after server restart (#3961)
  • Date and Time fields fixes
    • Date input field to support `01` syntax in format (#3940)
    • Date control does not switch to/from readonly with embedding (#3943)
    • fr:date: insert above/below clears the date (#3957)
  • Other fixes
    • Saving fails for forms contains both a file attachment and encrypted field (#3931)
    • Import: form version doesn't show (#3937)
    • Import: validation status flag can be out of date (#3942)
    • Email template fails when Explanation control is present (#3941)
    • Email template with "All controls": attachment should show filename (#3947)
    • fr:synchronize-repeated-content: "+" button doesn't work (#3956)
Form Builder:
  • Setting Read-Only to "No" with a calculated MIP no longer works (#3950)
  • fr:date: in Form Builder, you have to click exactly on the icon to pick a date (#3962)
You can download the latest version of Orbeon Forms from the downloads page.

Don’t forget to grab a trial license for the PE version.

Please send feedback:
We hope you enjoy this release!

Wednesday, February 27, 2019

Improved date and time controls

Orbeon Forms 2018.2 features new Date and Time form controls.

The reason the controls are new is that we wanted to modernize the date picker on one hand, and add new features such as the ability to exclude certain dates from the date picker on the other hand. This would have been very hard to do with the older controls which had a lot of history behind them. So we created a brand new Date control, and we used the opportunity to improve the Time control as well. The new controls are implemented as XBL components, which means they are more modular and easier to maintain.

Here is the new date picker with the January 5, 6, 12 and 13 dates unavailable (grayed out) using The "Dates to Exclude" constraint.




In addition, the controls have an option to take their "natural" (usually more narrow) width or, which is new, to fill a grid cell entirely to facilitate alignment.




You control whether a field takes its "natural" width or the full cell width from the "Control Settings" dialog, or globally for the form in the "Form Settings" dialog.



Here is another example showing different control widths, adjusting automatically to grid cell widths.



For backward compatibility, only forms created with Orbeon Forms 2018.2 default to having full width Date and Time controls, while forms created before that version default to the "natural" width. This can be changed in the control or form settings, or globally via a configuration property.

The legacy Date and Time controls remain available for the time being for backward compatibility scenarios, but new forms created with Form Builder, as well as existing forms loaded and republished from Form Builder, will automatically use the new controls.

We hope you will like these enhancements of Orbeon Forms 2018.2!

Thursday, February 14, 2019

Hidden fields

Orbeon Forms 2018.2 introduce a new form control in the toolbox called Hidden Field.

Now you might wonder why you would always hide a form field. There are two major use cases:
  • Holding intermediary calculations:  If the control has a "Calculated Value" and/or "Initial Value" formula, it can be referred to by variable name (like $my-intermediary-result) from other formulas.
  • Handling out-of-band validations: If the control has a label, alert and validations, a failing validation will show in the Error Summary. In addition, this also impacts the Wizard View's lax and strict validation modes, preventing forward navigation until the error is fixed by the user.
It has always been possible, with Form Builder, to hide any field by setting its visibility using the false() formula, or, with Orbeon Forms 2018.2, by selecting the option "No".

Control Visibility
But hiding a field this way can have unintended consequences. In particular, the control becomes in effect non-existent in the user interface when it comes to value change events which are useful in actions, and valid/invalid events which are used for validation. So even if the value of a non-visible control is invalid, the form is considered valid.

As a workaround, you can place a CSS class to hide a Calculated Value control to the user. The drawback of this is that the value of the control is still visible in the browser using "View Source" or development tools so this workaround cannot be used for sensitive data which the user should never see.

The new Hidden Field control, on the other hand, works like a regular control such as a Text Field in all respects, including events, validation, and alerts. Except, of course, that it doesn't show to the user at runtime. In particular, its value is guaranteed to stay on the server.

At design-time, in Form Builder, the control shows as a box with an icon so that the form author knows that a hidden control is in use. You can move that control and modify its properties like with any other form control.

Hidden Field in Form Builder
See also the documentation for details. We hope you will like this feature of Orbeon Forms 2018.2.

Thursday, February 7, 2019

Orbeon Forms 2018.2.1 CE

Today, following the release of Orbeon Forms 2018.2.1 PE, we also released Orbeon Forms 2018.2.1 CE which addresses some regressions and important issues. This update to Orbeon Forms 2018.2 CE is recommended for all Orbeon Forms 2018.2 CE users.

This release addresses the following issues since Orbeon Forms 2018.2 CE:

Form Runner:
  • Regressions fixes
    • Occasionally getting empty page (#3893)
    • Can no longer add row in repeated grid if all iterations are removed (#3892)
    • Errors don't show on last page of wizard (#3889)
  • Persistence layer fixes
    • MySQL: enabling lease causes errors (#3866)
    • With MySQL 8, Error near `row_number FROM orbeon_i_current c, (select @rownum := 0) r` (#3864)
  • Date and Time fields fixes
    • Funny-looking date picker in repeated grid (#3888)
    • Occasional off-by-one error when storing date (#3907)
    • Date control does not switch to/from readonly (#3908)
    • Upon entering a partial date and tabbing out, the full date should show (#3906)
    • fr:date: entering letters shows the current date (#3877)
    • Date picker fails to appear when field is shown after the page loads (#3909)
    • Programmatically focusing on date control shows picker (#3874)
  • Login page and user menu fixes
    • Login page hardcodes path to /orbeon context (#3876)
  • Other fixes
    • Number field doesn't take "natural" width even with setting (#3881)
    • Natural/full width setting missing for US Phone Number (#3883)
Form Builder:
  • Form Builder always using natural field width (#3901)
You can download the latest version of Orbeon Forms from the downloads page.

Please send feedback:
We hope you enjoy this release!

Orbeon Forms 2018.2.1 PE

Today we released Orbeon Forms 2018.2.1 PE. This update to Orbeon Forms 2018.2 PE contains bug-fixes and is recommended for all Orbeon Forms 2018.2 PE users.

This release addresses the following issues since Orbeon Forms 2018.2 PE:

Form Runner:
  • Regressions fixes
    • Occasionally getting empty page (#3893)
    • Can no longer add row in repeated grid if all iterations are removed (#3892)
    • Errors don't show on last page of wizard (#3889)
  • Persistence layer fixes
    • Saving fails for forms contains both a file attachment and encrypted field (#3931)
    • MySQL: enabling lease causes errors (#3866)
    • With MySQL 8, Error near `row_number FROM orbeon_i_current c, (select @rownum := 0) r` (#3864)
  • Date and Time fields fixes
    • Funny-looking date picker in repeated grid (#3888)
    • Occasional off-by-one error when storing date (#3907)
    • Date control does not switch to/from readonly (#3908)
    • Upon entering a partial date and tabbing out, the full date should show (#3906)
    • fr:date: entering letters shows the current date (#3877)
    • Date picker fails to appear when field is shown after the page loads (#3909)
    • Programmatically focusing on date control shows picker (#3874)
    • Embedding: new date picker is not positioned correctly (#3788)
    • Date picker vertical positioning to default to the bottom (#3924)
    • Readonly time field appears with (misaligned) icon (#3884)
  • Calculated values fixes
    • Calculated value not to be tabbable in view mode (#3917)
    • In view mode, calculated values don't wrap and the field heigh is too short (#3904)
    • Border for calculated value is too high and too wide (#3821)
  • Login page and user menu fixes
    • Login page hardcodes path to /orbeon context (#3876)
    • Support enter in username/password fields (#3918)
    • Center fields on login page (#3878)
    • User menu is narrower on Summary page (#3872)
  • Other fixes
    • "Initial data from service" attempts to migrate data even if response is empty (#3935)
    • Help resizes repeated grid in Bookshelf form (#3871)
    • Form metadata API doesn't return library forms unless user is admin (#3919)
    • Number field doesn't take "natural" width even with setting (#3881)
    • Natural/full width setting missing for US Phone Number (#3883)
    • Make `orbeonLoadedEvent` to fire once only (#3891)
    • Error when setting `oxf.xforms.sanitize` (#3882)
    • Incorrect test for form definition versioning (#3922)
Form Builder:
  • Form Builder always using natural field width (#3901)
  • fr:time component appears readonly in Form Builder (#3928)
  • Validation tab formatting issues (#3934)
  • Formula field is too narrow in Validation tab (#3932)
You can download the latest version of Orbeon Forms from the downloads page.

Don’t forget to grab a trial license for the PE version.

Please send feedback:
We hope you enjoy this release!

Thursday, January 17, 2019

Synchronized master-detail views

We regularly observe usage patterns reported by Orbeon Forms users. One pattern that comes frequently is support for what is traditionally called a master-detail view.

For example, you first enter a list of initial information (the master), as shown in the following screenshot.

"Master" view
Later in the form, for example in a subsequent wizard page, you complete the information (the detail) for each item of the list.
"Detail" view
Doing this until Orbeon Forms 2018.2 required writing very complex custom XForms code in the form, which usually required talking to the Orbeon support team. This is explained by the number of cases to handle: adding, removing, moving, iterations in the master grid, and also synchronizing values from the master grid to the detail view. Further, such custom code is hard to maintain and could break with new Orbeon Forms releases.

So with Orbeon Forms 2018.2, we are introducing a new synchronization component which does all of this declaratively and reliably. The component is maintained by Orbeon in new Orbeon Forms releases so you have peace of mind when upgrading.

We plan to add a user interface for this feature soon. In the meanwhile, it is easy to set this up by opening the Edit Source dialog and configuring the synchronization.

For more, see the documentation. We hope you will like this new Orbeon Forms 2018.2 feature!