Describe the bug
I am using alf.io to host a car show and we would like to display the additional fields we collected. For our purposes, this is the car's make/model/year.
To Reproduce
Steps to reproduce the behavior:
Go to Templates
Select a Template such as Ticket_PDF
Try to add an additional field (note: This is not documented but I found it in the source code as "additional-fields" with:
{{additional-fields.make}}
Press preview
You will get an error saying "field does not exist"
Expected behavior
You can preview the template
Workaround
Using the devtools in the browser, you can unhide the save button and save the updated template. The additional field then works as expected and displays in the final rendered template the registrant receives.
Describe the bug I am using alf.io to host a car show and we would like to display the additional fields we collected. For our purposes, this is the car's make/model/year.
To Reproduce Steps to reproduce the behavior:
{{additional-fields.make
}}Expected behavior You can preview the template
Workaround Using the devtools in the browser, you can unhide the save button and save the updated template. The additional field then works as expected and displays in the final rendered template the registrant receives.
Potential Fix I think this is happening due to this line passing an empty map into the template editor: https://github.com/alfio-event/alf.io/blob/1cc53b7ce3673cc30aa6d7c3cb006d78c4909db9/src/main/java/alfio/util/TemplateResource.java#L201
We should be passing the collection of fields.