It is common to encounter situations where we need to collect similar information across different forms. Consider an application to manage items, where different types of items share a common set of attributes, such as name, description, price, and quantity. In this case, it would be necessary to replicate these fields across different forms, which is time-consuming and makes future maintenance of these forms difficult.
To address this issue, we are creating the concept of subform, which allows us to define a set of form fields once and reuse them across different forms. A subform is a type of form that contains a specific set of information to be embedded in other forms (e.g., header information to be repeated across multiple forms in the application).
The definition and usage of subforms in Genio is supported by:


This merge request represents the first of a series of steps towards achieving a flexible implementation of subforms.
In this first step, the generated code for a subform is very similar to the code generated for a tab:
The support for the subform feature will be gradually added to the form editor:
Similar to what is done for forms with tabs, Genio ensures that all mandatory fields are present in forms with subforms. To achieve this, Genio checks not only the direct fields of the main form but also the fields of any subforms that may be present. For example, let's say there's a mandatory field called "Name" that must be included in the form. If the "Name" field is not found in the direct fields of the main form, Genio searches for it in the fields of any subforms that are included. If the "Name" field is not found in any of these places, the form is incomplete and will need to be edited to include the mandatory field.
There are a few pitfalls to be aware of:
As we continue to develop and improve our support for subforms, we have identified some areas for future work: