Change Row and Column Visibility in a Multi-Select Matrix
Matrix questions allow you to dynamically manage the visibility of matrix rows and columns. In this demo, matrix rows list car brands, and matrix columns display different qualities that you can rate. Use the checkboxes below to select the car brands and qualities that should appear in the matrix.
To implement conditional visibility for matrix rows or columns, follow these steps:
Prepopulate the matrix's
columns
androws
arrays with choice options from the main questions.
In this demo, therows
array contains a copy of choice options from thecars
question, while thecolumns
array is populated with all choice options from thequalities
question.Specify the
columnsVisibleIf
androwsVisibleIf
expressions.
These expressions are used as a filter for columns and rows. Use the{item}
placeholder to reference a row or column being evaluated within the expression. As an alternative, you can specify avisibleIf
expression for individual columns or rows.
Refer to the survey JSON schema for a code example.