Variables are a great way to add more realism and interactivity to your iRise prototypes. Variables allow you capture and pass data from one screen to another.
Here are a few examples of how you might use variables:
Capture data entered into form fields, like Text Inputs and Checkboxes
Dynamically populate text widgets and form fields
Set up conditional logic for Viewstacks and Action Sequences
Capture data entered into form fields (or user inputs)
You can save the data entered into form fields by adding an Action and choosing “Save user inputs”.
Each user input field is listed. For each user input field you’d like to save, enter or choose a Variable name. When the Action executes, the values entered in the user input fields will be saved as Variables that can be used throughout your project.
Set Variables manually
It’s often useful to manually set Variables. For example, perhaps the behavior or display of a screen should different based on the whether a visitor is logged in or not, or perhaps based on the visitor’s membership level. Variables allow you to set this state information.
You can set Variables manually by adding an Action and choosing “Set variables”.
Each Variable is listed. You can enter a value for one or more Variables or add a new Variable. In the example below, we have set up the following:
Set variable “Logged In” to “True”
Set variable “Membership Level” to “Platinum”
Once these Variables are set, they can be used to populate other fields or control conditional logic for Viewstacks and Action Sequences.
You can clear Variables by adding an Action and choosing “Clear variables”.
Populating text widgets and form fields
Once variables have been set in your project, they can be used to populate text widgets and form fields. You can set the value of field to a Variable in the Settings panel. In the “Override content” setting, simply choose a Variable.
Once set, the value of the Variable will be applied to the widget when the screen presented in Player.