Suppose you have included a single response question in your survey. However, when selecting a particular answer from this question, you want some text fields in a subsequent question to be greyed out, so that a participant cannot specify anything in these text fields. In order to arrange this, you can adhere to the following procedure:

First, for example, you include a single response question (q1 in this example) in the survey from which a participant can select a colour. Upon selecting the colour Yellow, you want the first column in the next matrix question to be completely greyed out. This implies that a participant cannot enter text at any row in column 1.

Prior to the single response question, you should then include a Script in the survey.

- At the box Is equal to the following term: you record three lines with the setSurveyFieldsEditable([VariableName]) function which will override the read-only mode. This implies that a participant is initially allowed to enter text at, say, all rows in column 1; there is yet no restriction on the colour Yellow.
- At the Execute setting, you select the option Anytime (immediately after every change to an involved variable).

Between the first (here: single response question) and second (here: matrix question) question, you then include a second Script including a filter.
- At the box Is equal to the following term: you record three lines with the setSurveyFieldsReadOnly([VariableName]) function which will set the read-only mode for the indicated text fields. In this example, these are the text fields:
– q2_1_1 > row 1, column 1 of question q2
– q2_2_1 > row 2, column 1 of question q2
– q2_3_1 > row 3, column 1 of question q2
Now, for a participant, depending on the value (= colour) defined at the filter, these text fields will be greyed out so that this participant will not be able to enter text in them, if he/she has selected the colour stipulated in the filter at the first question. - At the Execute setting, you select the option Anytime (immediately after every change to an involved variable).

After you have clicked on the Add filter button for this Script, a window appears allowing you to record the following data:
- if – Question – q1 (description of the question) – 3 Yellow – selected
In order to record the filter, you must click the green Save changes button.