B25.Form
Overview
This class lets you inspect the current form state as well as perform actions on it, such as adding handlers or updating values.
The B25.Form class is the main point of interaction for anything that you want to do on the form. Inside the customize
method (defined in the B25.Form.Customizer
interface) you can add your own event handlers to the form (or its child elements). Inside the handleEvent
method of your own handlers, you can inspect the current form state and update values on it (or its child elements). Use the getter methods to access lower level child elements, such as fields or related lists.
There are three events that you can hook into at the form level:
onInit - for prepopulating fields when a new reservation is created
onOpen - for changing the appearance of the form depending on the reservation being shown
onBeforeSave - for adding your own validation
Example 1: Adding a handler
Adding handlers is done inside the customize
method of your own implementation of the B25.Form.Customizer interface.
Also see: