Add event with template fails on custom fields
Issue seen on 5.16.2 (drupal 7) and confirmed on dmaster (5.18.alpha1). Steps to reproduce:
- Create a custom group for Event with 1 or more fields that are set as required.
- Create a new event template, including with custom field values entered.
- Go to add a new event, and choose your template, then click "continue". Result: Error message with "Please correct the following errors in the form fields below: [Custom field] is a required field."
When looking at the page source in more detail, you can see the following difference:
- Normal "add event" page uses the following value for the custom field's input element id and name: [field id]_-1
- After selecting a template, "add event" page uses the following value for the custom field's input element id and name: [field id]_[some positive number]
For example: custom_26_-1 (before), versus custom_26_32 (after).
If I modify the input element id, name, and the class of the parent tr element (maybe that's not needed?) to go back to the original value (like custom_26_-1), the form then submits properly.