Automatic field fitting using field tags (Form Builder) | FB_011
In this tutorial, we'll take a look at configuring fields on your MegaEdit canvas to fit the bleed, page or any margins that you have specified. This functionality is particularly useful, as these relationships will be maintained when the canvas is changed, including an aspect ratio change.
1. Begin by adding and configuring a field on your canvas
In my example, I've created a text field with a defined background colour, to make it clear how much of the canvas the field is covering.

2. Click on Custom Tab
Assign the field a name and a type, as we have previously covered with the text field using the Form Builder.

3. Add the FitToBleed field tag

4. When assigned to a field, it will always extend to the bleed of the canvas

5. FitToPage

6. A FitToPage Field Tag will extend the field to the page limits, but exclude the bleed

7. FitToMargin

8. This relies on any margins you have set up in the Output Type assigned to your product

9. Check Show border controls…
In addition to these options, we have the ability to apply borders to any of these three field tags.
This means, for example, we could apply a 10mm border on the left side, meaning regardless of the canvas size, the field will always sit 10mm from the specified field tag.

10. With Show border controls specified, border options will be available in the form
Initially these are locked, so changing one entry gives a matching value to them all. Users do have the ability to unlock these borders, so different values can be input for each edge.
Note: mm is the default measurement for the border, however this can be switched to inches within the script config.

11. Locked border example

12. Unlocked border example

13. Let's take a look at an example of a field with a FitTo tag and one without

14. FitToBleed
Our field with a FitTo tag is utilising FitToBleed with a 10mm border.
In contrast, the NoFit field is in exactly the same position and is exactly the same size, but does not have a FitTo tag or associated border.

15. We will now switch between canvas options in order to change the size and the aspect ratio.

16. The FitTo field maintains its relationship with the bleed

17. The NoFit field has resized, but has not maintained the relationship with the canvas size
