Feature: #106477 - Allow YAML imports and placeholder processing when creating new forms
See forge#106477
Description
The
Form now uses
the
Yaml when
creating new forms from templates. This change enables the processing of
placeholders within template files, such as environment variables in the
format
%env, as well as the import of other YAML files.
This enhancement allows for more flexible form templates that can adapt to different environments through environment variable substitution and YAML imports.
Examples
imports:
- { resource: 'User.yaml' }
identifier: contactForm
label: 'Contact Form %env(ENV_NAME)%'
type: Form
renderables:
-
type: Page
identifier: message
label: Message
renderables:
-
defaultValue: ''
type: Text
identifier: text-1
label: Subject
renderables:
-
type: Page
identifier: user
label: User data
renderables:
-
defaultValue: ''
type: Text
identifier: username
label: Username
Impact
Form templates can now contain environment variable placeholders using the
%env syntax and import other YAML files. These placeholders
and imports are automatically resolved when new forms are created from the
template.