When working in the code of a form component, you may need access to the GE being displayed by the form component.
This can make it very tempting to implement business logic in a form template layout control. Resist this temptation. Any logic that is not directly dealing with the UI is business logic and should be implemented as such in a client-side GE plugin.
Retrieving the GE from the main form component function:
Form component objects have a function called getGEObject(), which retrieves the GE object behind the form template hosting the component. Any time you have access to the form component object, you can simply call getGEObject() on it. If the GE has been loaded, it will be returned.
Retrieving the GE from eventData: