Form Field Variables
Form input provides additional control for customizable products. The shopper enters information in the interactive form fields of the document. These form fields are located in the Forms tab. Each form field is a variable that you, as an administrator, can set up in the Forms tab of the Online Editor.
NOTE: Form input fields can be combined with editable text frames in the same document.
Insert variables (fields) in a forms document 
This procedure is only possible in the Forms and Expert workspaces which include the Forms tab. See “Forms Tab” for more information.
1 Place a new text frame on the document.
2 Click the Forms tab to create the variables (form input fields) for your form.
3 Click the Add button (plus icon) to add a variable to the list.
4 Click the Edit button (pencil icon) next to the variable to set up/edit the variable.
The Settings dialog is displayed.
5 Enter a Name and Display Name, and choose a Variable Type.
6 Complete the General and Type Specific tabs. See “Variables Settings Editor” for more information.
7 Click Close to close the Settings dialog.
The variable is added to the Variables list.
You have created a variable which can now be used in multiple text frames.
8 Add more variables as required.
9 Choose a default text direction:
Left to Right
Right to Left
10 Double-click in the text frame or click the Edit Text button on the in-line toolbar.
At the insertion point you can now insert the variable.
11 Select the variable you want to insert in the Variables list and click the Insert Variable button.
OR
Double-click the variable in the list to insert it in the document.
The variable is inserted in the text frame. The variable name starts and ends with a “%” character.
OR
Type the variable name.
12 If required, click the Insert Text Condition button to insert a condition.
13 In the Step 2: Assign Variables pane, select the Selected frame contains variables check box to enable the variables in the text frame. See “Step 2: Assign Variables Panel” for more information.
NOTE: If this check box is not selected, the variable names are displayed as text and it is not possible to enter data in the form fields on the storefront.
This option also activates the Toggle Source button on the in-line toolbar.
TIP: Select text in your document and click the Insert Variable button to insert a variable with the selected text as sample text.
14 In the Step 3: Initialize Form Variables pane, you can enter sample text in the form fields or leave the form fields blank. See “Step 3: Initialize Form Variables Panel” for more information.
If you enter sample text, use the Toggle Source button to switch between the variable source code and the sample text.
Figure 10.89: Variables in a document - Online Editor view
15 Repeat the procedure for all text frames with variables.
16 Click the Save button on the workspace toolbar to save your changes.
17 Close the Online Editor and add the product to a store.
NOTE: If the product has already been assigned to a store, the changes you made are automatically retrieved for this product on the storefront.
18 Inspect the form on the storefront.
Figure 10.90: Form input fields on a storefront – display names
Inspecting the form on the storefront is necessary to ensure that shoppers can use the form fields as expected and submit the order. See “Testing Customizable Products”.
 
Figure 10.91: Filled form input fields on a storefront
Add an image variable to a form 
An image variable adds a drop-down list to the form where the user can select an image to be inserted in the document.
1 Create a new variable for the document and choose Image as Type.
2 Close the New Variable Settings as no other type-specific settings need to be set.
3 Draw an image frame in the document.
4 To link the image frame with the variable, select the frame in the document and then click the Attach Image Variable button in the Forms Step1: Create Variables panel.
5 All the image buttons on the form must be associated with one of the image libraries. To do this, click the document tool in the top toolbar and then the folder button to browse to a directory. See “Images Tab” for more information about managing image assets and the different image directories. The images in the specified directory can be selected by the user via a drop-down list on the form. The selected image is placed in the document.
Figure 10.92: Image variable on a form
Alternatively, the user can browse to a local folder on his computer to select an image.
NOTE: Browsing for a local file is only supported for image variables that are linked to the "My Images" directory.
NOTE: The constraints that apply to the inserted images are set on the image frame. See “Objects Tab”. It is recommended to lock the frame so the shopper cannot delete the image from the image frame while the variable still refers to the image; otherwise the image is reloaded when the document is reopened.
Add a button bar to a form 
1 Create a new variable for the document and choose Button Bar as Type.
2 Click the Add button (plus icon) to add a variable item. This is the actual button.
3 In the Label box, enter the text you want to display on the button.
4 Optionally, enter a tooltip (a message that appears when the user hovers over the button in the form).
5 Optionally, choose an icon. If you choose an icon, the button will be the icon instead of a button with a label.
6 Click the Edit button to open the Action editor where you can create the code for the action that you want to assign to the button (e.g. clear all input fields: set variable x value = string <empty>). The action will be activated when the user clicks the button. See “Variable Actions” to create actions.
7 When you’ve finished creating your action, close the Action editor.
8 Click the Add button (plus icon) to add another variable item if you want to add another button to the button bar and repeat the procedure for as many buttons that you want.
9 Close the New Variable Settings and finish the procedure to add the variable to the form.
Figure 10.93: Button Bar variable on a form
doc. version 6.0.4