4D v16Form inheritance |
||
|
4D v16
Form inheritance
Form inheritance
In addition to the manipulations explained in the video, you should also note that:
Create at least one inherited form:
In certain cases, you may need for a parent form object to be hidden or only available according to the context or the table concerned.
In this video, well set up forms so that we can have a consistent interface, stored at a single place per form category. We have already used page 0 in forms in order to centralize elements that are shared on every page of the same form. Form inheritance consists of creating a form where we place objects that are shared between several forms (texts, buttons, etc.) that will inherit from this "parent" form. In order, we need to:
The parent form can be a project form or a form associated with a table. Here we're gong to create this new form.
Now that the parent exists, we can associate child forms with it:
We can see the contents of the parent form immediately appear in the background. If we modify the location of the button on the parent form and save it (without closing it), we'll see the same modification carried out directly on the child form. Since the goal is to keep the interface consistent, we're going to move the buttons of the child form to the parent form.
and the buttons appear again automatically in the child form. Now, to apply this modification to other input forms, you just need to:
This means that now any changes made to the parent form, for instance if we move everything just a few pixels and then save it, will be automatically carried out on all the forms that inherit from this parent form.
|
PROPERTIES
Product: 4D
HISTORY
ARTICLE USAGE
Self-training ( 4D v16) |