Lighthouse Studio

Hidden (Free Format Variable)

You may optionally change the type of data that are stored by using the drop-down box on the Free Format Variable dialog to change from the default data type (Whole Number) to Decimal or Text.

 


Example #1: Setting the hidden variable equal to a random number used in the survey.

 

Suppose you declared a random value earlier in the survey (such as "RandNum(53)") and wanted to store the value of that random number in your data set.  

 

1.  Add a Free Format question to your survey and a variable (e.g. myvar1_rand) of type hidden.

2.  Edit the HTML (using the pencil icon and using the Free Format Tools button select myvar1_1 from the drop-down control list, to insert the following text in your HTML:

 

<input name="myvar1_rand" type="hidden">

 

Then, edit that text to assign the value equal to the function RandNum(53):

 

<input name="myvar1_rand" type="hidden" value="[%RandNum(53)%]">

 

 


Example #2: Setting the hidden variable equal to the sum of two numeric variables on a previous screen.  Assume the two previous numeric variables were Value1 and Value2.

 

1.  Add a Free Format question to your survey and a variable (myvar1_sum) of type hidden.

2.  Edit the HTML (using the pencil icon and select the Free Format Tools button to insert the following text in your HTML:

 

<input name="myvar1_sum" type="hidden" value="[%Q1+Q2%]">

 

Created with Help & Manual 8 and styled with Premium Pack Version 4 © by EC Software