Sam Webster
Created Feb 05, 2024Assigning fields to layers (Form Builder) | FB_010
MegaEdit already has an activatable script which enables layer functionality within your product templates. This capability comes built in to the Form Builder's capabilities, allowing you as the admin to assign fields to numerous background and mask layers. This has a wide range of purposes, however primarily allows the admin to create precision control over how existing and user-created fields operate in relation to each other.
Start by adding and configuring a field in the usual Form Builder fashion. If that field is to be part of a defined layer, assign it within the Field Tags
By default, the Form Builder provides 5 background layers and 5 mask layers, although these numbers can be increased in the Form Builder script config.
Selecting a layer and clicking the + icon will assign that field to a particular layer.
Note: Only assign multiple fields to a single layer if they are NOT going to interact, such as if Z axis arrangement of multiple fields within a single layer is not an issue.

Any field not assigned to a layer (such as those added by a user) will sit BETWEEN the background and mask layers.
Note that even if you give the customer the ability to alter the Z axis arrangement of a non-layer field, they will not be able to set the field to appear behind background layers or in front of mask layers.
The background and mask layer fields can still be interacted with by the user, should you wish to allow it, however will always sit where you intend them to sit.
Some examples of use cases could be:
Applying a texture image as a background layer
Applying print markings or guidance which are always on the top layer but are not on the final preview or print
Easily maintaining a mandatory Z axis layout of fields
