-
Bug
-
Resolution: Fixed
-
Neutral
-
2.5.2, 2.7.1
-
None
-
-
Empty show more show less
-
Maintenance 45, Maintenance 46
-
5
Steps to reproduce
Configure a project that have following pages structure:
- page A + page AA + page AB + page AC
Then use Forms Module and on each of these pages, so 4 forms configured.
Expected results
I should see paremeters (freemarkerParams) only from form defined on page A.
Actual results
In the form on page A, in Email and Confirmation E mail tabs, under field `freemarkerParams` - I can see all of the parameters defined under all of these 4 forms.
Workaround
No
Development notes
Debug shown in info.magnolia.module.form.fields.factory.StaticFormFieldFactory#findAllFormControlNames I have root page as input param. And nodes are searched recursively inside that page. Instead of rootPage I think I should have form node, not page node. Thanks to that parameters will be searched only inside that particular form, not on the whole page.
Example:
- In form A I have following fields: 'name', 'email', 'msg' and submitButton
- In form AB I have: 'amount', 'subject', 'catName' and submitButton.
On confirmation tab in form A I can see following parameters under freemarkerParams field: 'name', 'email', 'msg', 'amount', 'subject', 'catName'.
In your documentation under this field description we have:
Available fields for Freemarker syntax | Form field names that can be used in Freemarker tags. |
And if in mail message in form A I will use parameter from form B (for example catName) -> there will be an exception.
Customer impact:
This bug has been reported by our client. They have one small contact form on rootPage. And they have another, very large (around 200+ fields) in one of the subnodes. And in this contact form on root page they can see all of the fields from this big form.
This misleading causes content editors / authors creating emails with errors.