Template Variables - Alekseon/magento2-widget-forms GitHub Wiki
Template variables can be used to display form values in email templates or on success message.
Available variables:
- Form title
- Field label
- Field value
(Package magento2-custom-forms-frontend is required)
If you want to add those values, you can use the following variables:
{{formTitle}}
{{fieldLabel id="field_identifier"}}
{{fieldValue id="field_identifier"}}
field_identifier - Each form field has his unique identifier:
|
Use this identifer in template:
{{fieldValue id="1666602651_1"}}
Notice: Field identifier is editable, You can always change it to more significant code.
Notice: You can use fieldValue directive for listed below field types:
- Text Field
- Text Area
- Yes/No
- Dropdown
- Multi Select
- Image
If we have Name field with identifier name in form:
|
Thank You {{fieldValue id="name"}}.
We have received your request for {{formTitle}}.