Skip to main content
Skip table of contents

B25.FormEventHandler

Overview

Extend this class to create your own handlers that react to events on the form.

To add your own event handlers, first create your own class which extends B25.FormEventHandler. Then, inside the customize method (as defined in the B25.Form.Customizer interface), you can bind an instance of your class to an action on the form.

To extend this class, you must override the handleEvent method. Inside the handleEvent method you can then add your own logic to respond to events and manipulate the contents of the form.

Example

CODE
global with sharing class MyEventHandler extends B25.FormEventHandler {
    global override void handleEvent(B25.FormEvent event, B25.Form form) {
        form.getField(B25__Reservation__c.B25__Title__c).updateValue('Hello World!');
    }
}

Methods

handleEvent

CODE
abstract void handleEvent(B25.FormEvent event, B25.Form form)

This method must be overridden in your own event handlers. Inside this method, you can inspect the event (as well as the current state of the form) and react to it by manipulating the form.

Parameters:

Name

Type

Description

event

B25.FormEvent

The event that your handler is responding to.

form

B25.Form

The form, which you can manipulate.


getHandlerName

CODE
String getHandlerName()

Returns the name of this handler. All default handlers that have been added by GoMeddo have a descriptive name, which allows you to recognize them. This is useful if you want to disable specific handlers defined by GoMeddo. See Default Handlers for an overview of which handlers are added by default.

Return value: String

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.