Sam Webster
Created Jan 24, 2024Combining variables in the same text field (Form Builder) | FB_015
In this tutorial, we'll learn how to write your Form Builder script config for multiple variables.
We'll also take a look at how we can combine these variables to appear in the same text field on your canvas, as well as how to automate a line break between variables.
We begin by navigating to our global config for the Form Builder script. Remember, we can create variables on a product by product basis if required, however creating them on a global level will ensure all products using the Form Builder script will have access.
Creating multiple variables is basically a repeat of the config for the first variable, however remember to add a "," at the end of your first variable config. This tells the system to move on to the next.
In this example variable, we are going to ensure that a line break is input as soon as we start typing into the field on the form. So here, for example, this will ensure that our Name and Title fields always appear on different lines, even if they are used within the same text field.
This is accomplished using "\n" in the prefix, but can also be applied to the suffix.
