BaseGatheringFormController

Base Gathering Form Controller

Provides shared date validation logic for gathering forms. Extended by gathering-form-controller and gathering-clone-controller.

Features:

  • Automatically defaults end date to start date when start date changes
  • Validates that end date is not before start date
  • Provides real-time feedback to users

Constructor

new BaseGatheringFormController()

Methods

clearValidationMessages()

Clear validation messages

connect()

Connect function - runs when controller connects to DOM

endDateChanged()

Handle end date changes Validates that end date is not before start date

showValidationError()

Show validation error message

startDateChanged()

Handle start date changes Automatically updates end date to match start date if end date is empty or before start date

validateDates()

Validate dates Ensures end date is on or after start date

validateForm()

Validate form before submission