Form Step Properties
A step can contain pre-handlers and handlers that can perform a variety of actions either before a step is rendered or after the website visitor navigates to the following step in the form. Handlers and pre-handlers consist of commands, routers, or script that can perform a wide variety of tasks.
To view a step's properties, click the button to toggle between step and form element properties above the properties pane.
In This Topic
Handlers and Prehandlers
Interactive Forms contains handlers for manipulating data in a session and form scope, copying files, sending e-mail, and executing JavaScript. The actions assigned to a pre-handler are executed before a step is rendered in the website frontend. The actions assigned to a handler are executed after a step is submitted by the website visitor. The actions that you can assign to handlers and pre-handlers are identical. In addition to handlers and routers, a step can have validators assigned to it in a handler (but not in a pre-handler). To add actions to a handler or pre-handler, click [Handlers and Routers] or [Pre Handlers]:
The Handlers and Routers pane appears. The available handlers that you can add are in the "Handlers" list. The available routers are in the "Routers" list, the "Condition" tool is shown by C, and the canvas where the handlers, router, and conditions are placed. To place a handler, router, or condition on the canvas, simply click it in the list.To expand the handler, router, or condition, click the plus sign (+) at the far right. To expand all handlers, router, and/or conditions that are on the canvas, click the expand all button.
The three types of objects that appear on the canvas are represented by the following symbols:
Symbol | Description |
|---|---|
Handler | |
Router | |
Validator | |
Condition |
How to use each of the handlers and routers and the condition is described in the following sections.
To add handlers, routers, validators and conditions, click the name of the form step in Interactive Forms and then expand the relevant accordion section:
Add Value to Session
The Add value to session handler adds a value from the form scope to an XperienCentral session. This makes it possible to use personalization based on information taken from a form. A form scope runs within a XperienCentral session which contains personalized information about a website visitor based on their profile. A form scope also contains information that is specific to the visitor. Using the "Add value to session" handler, data from the form scope can be written to the XperienCentral session where personalization can then be used to manipulate the data.
To add a value from the form scope to an XperienCentral session, follow these steps:
Select "Add value to session" from the list of Handlers.
Enter the following information in fields:
Click [Apply].
For example, the following XML adds the value from the form element "wm_fragment_3" from step 1 of the form to the session:<fragment3>$wmstep_1.wmfragment_3.value$</fragment3>
Copy File
The Copy File handler copies a file that has been uploaded by a website visitor to a new location. To copy a file that has been uploaded by a website visitor to a new location, follow these steps:
Select "Copy File" from the list of handlers.
Enter the following information in fields:
Click [Apply].
Execute JavaScript
The Execute JavaScript handler executes the JavaScript code that you enter. To execute JavaScript, follow these steps:
Select "Execute JavaScript" from the list of handlers.
Enter the JavaScript to execute in the "Script" box.
For complete information on using JavaScript in Interactive Forms, see the section Scripting in Forms.
Send E-mail
The Send E-mail handler sends an e-mail to the specified recipient. In the body of the e-mail you can enter JavaScript in order to send information from the formscope or session as part of the message. To send an e-mail, follow these steps:
Click "Send Email" in the list of handlers.
Enter the following information in the fields. The information can be selected from a field in the form (the default option), typed in as free text, or typed in as a free expression. To switch between the modes, click the down arrow next to the field and select the option from the drop-down list.
Set Info From Session in Formscope
The Set info from session in formscope takes a value from the specified XperienCentral session and adds it to the current form scope. This is the opposite of what the "Add value to session" handler does.
To add information from the session to the form scope, follow these steps:
Select "Set info from session in formscope" from the list of handlers.
Enter the following information in the fields: