Add Custom Forms

Custom forms rely on you to provide the necessary code.

This task assumes that you have created a BA diagram with a Program entity.

  1. Right-click on the open BA diagram and select New > Custom Form.
  2. Right-click the new form and select either Implement CRUD Form or Implement CRUD Form from Database from the context menu.
  3. Complete the design of the form and save your changes.
  4. Add and configure the relation from another entity in the BA diagram to your newly created custom form.
    When you add a relation to a custom form, the relation type is set to CustomFormRelation.
  5. Provide custom code for the custom form within the provided <POINT> and <BLOCK> elements of the generated Genero source file.
    The Genero source file for the custom form shares the same name as the custom form, but with a .4gl extension. It can be found in the Intermediate Files virtual folder of the node containing the custom form file. For more information on coding within <POINT> and <BLOCK> elements, see Adding custom code.
    Examine the demo applications for examples of custom forms. For example:
    • In the OfficeStore demo, the OrderLoginCustomForm form provides an example of a custom form implementing a login.
    • In the OfficeStoreMobile demo, the AccountSplash form provides an example of a custom form implementing a splash screen.
    To view the forms, open the .4fdc file. To view the generated code, open the associated .4gl file.