Further customization is available via configuration. Firstly, you can set defaults for newly created forms via the DaysToRetainSubmittedRecordsFor and DaysToRetainApprovedRecordsFor keys found within Umbraco:Forms:FormDesign:Defaults.
And you can control when and how often the scheduled background task actually deletes the records via the FirstRunTime and Period settings within Umbraco:Forms:Options:ScheduledRecordDeletion.
Documentation for these settings can be found on this page.
"Magic string" Formatting
Umbraco Forms has a useful feature for replacing placeholder strings at runtime with the values derived from different sources, such as the HTTP context or the current page. These are known as "magic strings".
Until now the replacements were "as is", with the placeholder replaced by the raw value obtained from the source. With this release, we've introduced the ability to format these values, such that for example dates, numbers, currencies and strings can be rendered in a more appropriate manner.
Using Magic String Formatters
These work like AngularJs filters in terms of syntax so should hopefully be familiar to many Umbraco developers.
For example, to truncate a string value obtained from a page property with the alias "title", you could apply a magic string of:
[#title | truncate: 100]
This release of Umbraco Forms ships with filters for changing the case of strings and formatting numbers, currencies, and dates. Please see this documentation page for more details.
Creating Magic String Formatters
As well as the format options available with Forms, it's also possible to create your own via C# code. This works in a similar way to other extension options available, where you create a class implementing a specific interface - in this case IParsedPlaceholderFormatter - and register it as part of application startup.
The interface requires that you provide a name that the user will use to apply the formatter, and a function that takes the raw string value and formats it as appropriate.
Documentation for this extension point is available here.
Block List Label for Forms
When working with the Block List list editor in Umbraco, the editor experience can be enhanced by defining a label for the appearance of the Block.
These labels can contain AngularJS filters, and with this release, we will ship one that can be used to extract the form name from a fom picker referenced in the label template.
For example, assuming a property containing a picked form with an alias of "contactForm", the
By using the filter as follows, the form's name will be displayed instead.