Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Hidden Variable

I have created a hidden variable to use as an indicator to terminate the survey.  I had assumed that hidden meant it would not show up on the survey page but it is displaying.

Does anyone know how to make it invisible or hide it so it does not display?

Here is the HTML code to define the FREE FORMAT | HIDDEN variable:

<input name="hS1_test" id="hS1_test" type="numeric" value ="
[% Begin Unverified Perl
    my $test = 1;
    if (GETVALUE('S1') < 15) { 
        $test = 0; 
    return $test;
End Unverified%]  
asked Mar 21, 2019 by BernieH

1 Answer

+1 vote
Best answer
Change to type="hidden".

You can set the Data Type to Whole Number within the free format question via the pull down menu.
answered Mar 21, 2019 by Paul Moon Platinum (83,375 points)
The question is type hidden.  If there were no HTML code, it wold not show on a page but because I need to have HTML code, the result from the code is displayed.
Eureka!  Even though I declared the variable as "hidden",  the HTML code also needed to declare the type="hidden", not numeric which I mistakenly thought it needed to be data type.  Thank you.