Hi,
I am in need of clarifications for the below 3 questions.
Question: 1
I have a hidden question the only question in a page and it should not be visible while answering the survey. I have added the below code but still it is visible
<style>
#[% QuestionName() %]_div {
display: none;
}
</style>
Question: 2
I want to find whether value 12 is available or not in the constructed list, the below code works fine but it seems to be lengthy.
<input name="[% QuestionName() %]_Sports" id="[% QuestionName() %]_Sports" type="hidden" value="
[% Begin Unverified Perl
if (LISTVALUE("Attributes3",1)==12) {return 1;}
elsif (LISTVALUE("Attributes3",2)==12) {return 1;}
elsif (LISTVALUE("Attributes3",3)==12) {return 1;}
......................
......................
......................
elsif (LISTVALUE("Attributes3",85)==12) {return 1;}
else {return 0;}
End Unverified %]
">
Is there any other method to use instead of above lengthy and below loop codings?
<input name="[% QuestionName() %]_Sports" id="[% QuestionName() %]_Sports" type="hidden" value="
[% Begin Unverified Perl
my $a=0;
for( $a = 1; $a <= 85; $a = $a + 1 ){
if (LISTVALUE("Attributes3",$a)==12)
{
return 1;
last;
}
}
return 0;
End Unverified %]
">
Question: 3
I want to show different level texts for screener against other ACBC sections and use the following code
if(QUESTIONNAME() eq "Beverages_Unacceptable1" || QUESTIONNAME() eq "Beverages_Unacceptable2" || QUESTIONNAME() eq "Beverages_Unacceptable3" || QUESTIONNAME() eq "Beverages_Unacceptable4" || QUESTIONNAME() eq "Beverages_MustHave1" || QUESTIONNAME() eq "Beverages_MustHave2" || QUESTIONNAME() eq "Beverages_MustHave3" || QUESTIONNAME() eq "Beverages_MustHave4" || QUESTIONNAME() eq "Beverages_MustHave5")
{
return "Without Caffeine";
}
Instead of this, is there any way to use like below?
if(QUESTIONNAME() eq Unacceptable || QUESTIONNAME() eq MustHave)
Please help. Thanks