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.