The columns
tag is valid on radio and checkbox questions. It controls how many different vertical columns of answer options ought to display.
Syntax
columns
accepts a number, variable, or Perl expression.
Caution! A variable or Perl expression must evaluate only to non-zero, sensible number of columns. Zero or null values prevent the survey from working.
# Specific Number columns: n (where n is a given number) # Variable columns: $Qx (where x is a question storing the number of columns to display) # Perl columns: Perl Expression
Examples
Show three columns
This is a basic example that sets the number of columns to 3.
Show as many columns as specified in previous question
This example uses the number entered at Q2 to determine the number of columns shown at Q3.
Perl ternary
This example uses Perl ternary syntax to write a conditional statement. The statement can be read as, "If Q4 has a value of '1', use '2' for the number of columns; otherwise, use '4'."
Comments
0 comments
Please sign in to leave a comment.