Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional Fields to Collect cannot be edited in the Template Editor #1354

Open
andrewlewis426 opened this issue May 9, 2024 · 0 comments
Open
Labels

Comments

@andrewlewis426
Copy link

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:

  1. Go to Templates
  2. Select a Template such as Ticket_PDF
  3. 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}}
  4. Press preview
  5. 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.

Potential Fix
I think this is happening due to this line passing an empty map into the template editor:

return buildModelForTicketPDF(organization, event, sampleTicketReservation(event.getZoneId()), ticketCategory, ticketWithMetadata, imageData, "ABCD", Collections.emptyMap(), List.of());

We should be passing the collection of fields.

@cbellone cbellone added the bug label May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants