Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
E
Events
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards
  • Development
  • Events
  • Issues
  • #13

Closed
Open
Opened Aug 22, 2019 by Martin@martinh

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:

  1. Create a custom group for Event with 1 or more fields that are set as required.
  2. Create a new event template, including with custom field values entered.
  3. 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.

Edited Aug 22, 2019 by Martin
To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: dev/event#13