BaseGatheringFormController

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()

Source:

Methods

clearValidationMessages()

Description:
  • Clear validation messages

Source:

connect()

Description:
  • Connect function - runs when controller connects to DOM

Source:

endDateChanged()

Description:
  • Handle end date changes Validates that end date is not before start date

Source:

gatheringTypeChanged()

Description:
  • Handle gathering type selection change — show that type's description

Source:

showValidationError()

Description:
  • Show validation error message

Source:

startDateChanged()

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

Source:

validateDates()

Description:
  • Validate dates Ensures end date is on or after start date

Source:

validateForm()

Description:
  • Validate form before submission

Source: