Release Candidate Generic Top Hero For Com 1500X500px 1@2X

Umbraco Forms 11.2 and 10.4 Release Candidates

Take the new releases for a spin!

Andy Butland
Written by Andy Butland

In a couple of weeks, a new minor release for Umbraco Forms will be available. It contains new features and further product improvements and, as usual, we're making it available first as a release candidate to review. You can read more about the new features and how to try them out in this post.

Overview:

  • What’s new in Umbraco Forms 11.2 and 10.4?
    • Forms API Enhancements
    • IP Recording
    • Customize Default FIelds For A Form
    • Forms Tag Helper
    • Performance Optimizations
    • Other Updates
  • How to test
  • How to get your hands on the Release Candidates
  • When is the Public Release?

We are releasing functionally equivalent minor updates to Forms 10 and 11, so whether you are on Umbraco's LTS (long-term support) or the latest major version, you'll be able to benefit from the same upgrade to Forms.

As with previous releases, we are issuing first release candidates so you can evaluate what’s included and ideally try them out on your existing solutions. Of course, if you do find any issues, or simply have comments for further improvement on the new features, we welcome any feedback.

How to get access to the new version and where to submit any comments and report issues, is discussed at the bottom of the post.

Let’s have a look at what you can expect in this latest release 👀

What’s new in Umbraco Forms 11.1 and 10.3?

This minor release one is a relatively small one, bringing together a number of improvements we have been working on, such that versions are aligned from a functional perspective when Forms 12 is released.  The Forms 12 release candidate that is already released also includes all of these updates.

Forms API Enhancements

A few versions back we released an update to Forms that provided an API, allowing you to retrieve definitions and submit forms in a headless fashion, or using AJAX requests on the client.

We've had some useful feedback on the issue tracker from early adopters of this, as well as considered other improvements we could add.

We've added a configuration option that you can use to enable or disable the API.  As not everyone will want to use it, by default this is off, so you will now need to amend this configuration if you want to use the API.  Please note that anyone upgrading will need to to set this configuration value to continue using the API after the update.

"Forms": {
  "Options": {
    "EnableFormsApi": true|false
  },
}

 

An optional "culture" parameter can now be added to the request to receive a form definition and to post a submission.  This ensures things like dictionary translations used for form labels work as you'd expect in a multi-language setup.  Usage is documented here.

We've also included a hook for custom form validation, such that forms submitted via the API are aligned in their behaviour in this respect with those submitted via standard full page post backs.  This ensures any custom validation you have applied to your Forms setup will validate a form submission.

Finally we've fixed an issue with using the reCAPTCHA fields with the API, and updated the public gist linked from the documentation to illustrate how to work with them.

IP Recording

Forms has traditionally recorded the IP of a form submission into the database, along with the other details provided.  There were a couple of issues with this - one being that it didn't accurately record IPs that were provided via CDNs, and the other being that you might not want this behaviour at all.

We've added configuration for this feature now:

"Forms": {
  "Options": {
    "EnableRecordingOfIpWithFormSubmission": "true|false"
  },
}

 

The default, which maintains existing behaviour is "true".

Setting it to "false" will disable the IP tracking (this will be the default in Forms 12).

Having investigated, we decided that rather than adding functionality to Forms to determine the actual client IP address via CDN headers, we will recommend using ASP.NET's forwarded headers middleware to resolve the issue.

Customize Default Fields For A Form

In a previous version we introduced an abstraction for the default addition of workflows to a form.  This uses an interface called IApplyDefaultWorkflowsBehavior that we provide a default implementation for, which adds a single workflow to a form that sends an email to the creator.  If you wanted some other default, you could apply it by implementing this interface yourself and registering it with the DI container.

With this release we are adding the same thing for fields when creating a new "empty" form, via an interface called - you guessed it - IApplyDefaultFieldsBehavior.The default implementation does what Forms has done previously, which is to add a single "data consent" field to a single page form.

Details and an example are available at the documentation.

Forms Tag Helper

We received a welcome contribution from Richard Thompson to the community "tag helpers" repository, providing a tag helper for rendering an Umbraco Forms form.  He was happy for us to take this and ship it with the product itself.

We adapted it a little from his original version, providing a helper around the underlying view component for rendering a form.

Details for use, along with other improved documentation on the various options available for rendering forms, can be found here.

Performance Optimizations

In dealing with a couple of support cases over the last month or so, we've identified a few places where we can make optimizations in the code to improve performance.

One place where you may notice this is with the Forms section trees and editors, particularly if you have quite a number of forms in your setup.

We've identified a means of reducing the number of database calls required when saving form submissions, available when approval workflows aren't in use.

Finally we've relooked at an old issue that could manifest itself in incorrect settings being applied to workflows.  This was resolved in the past but we've found a more optimal means of doing so, removing the use of a lock and instead relying on service registration lifetimes.  In doing this we also resolved a new issue raised related to prevalue sources.

All these optimizations are available with these latest releases.

Other Updates

The other updates included in the release are as follows:

How to Test

You can either create a new installation using the package available from the link below or upgrade an existing project.  Both scenarios can provide valuable feedback.  If upgrading, you may find you need to update your cache buster version number.

If you find anything in the release candidate that is not working as you’d expect, we’d be grateful for feedback on the GitHub issue trackers for Forms. You’re welcome to add comments to the features and fixes listed linked above or to submit new bug reports indicating that you have been working with the release candidates.

How to get your hands on the Release Candidate

For Forms, release notes can be found in the documentation. The release candidate is available from the usual NuGet feed.

When is the Public Release?

We’re aiming for a full public release on Tuesday, 13th June 2023, when the package will be available for new and existing projects on Umbraco Cloud and via NuGet.

A big H5YR 🙌  to everyone who has contributed to these releases by highlighting pain points, reporting issues, providing feedback, and suggesting solutions. And thanks to everyone willing to lend a hand in testing it out.

Bug reports are best handled on the issue tracker and as always, we welcome you to submit product feedback and questions to product@umbraco.com.

 

Loved by developers, used by thousands around the world!

One of the biggest benefits of using Umbraco is that we have the friendliest Open Source community on this planet. A community that's incredibly pro-active, extremely talented and helpful.

If you get an idea for something you would like to build in Umbraco, chances are that someone has already built it. And if you have a question, are looking for documentation or need friendly advice, go ahead and ask on the community forums.

Want to be updated on everything Umbraco?

Sign up for the Umbraco newsletter and get the latest news and special offers sent directly to your inbox