====== Filters and Conditional Questions ====== A filter question is always required if the course of the questionnaire is to be adapted individually. In the simplest case, a question is hidden because you know from a previous answer that the question is irrelevant. * //Filter Question// -- The question whose answer should influence the further course of the interview. * //Filter Condition// -- The "if part" of the filter, a definition of when the filter becomes active. A filter condition (e.g. "was option A selected?") can either be met or not. * //Filter Effects// -- The "then part" of the filter, the effect on the interview (e.g. displaying an additional question) if the filter condition is met. In SoSci Survey different types of filter guidance are available: * A //[[:en:create:simple-filters|Question Filter]]// is defined in the **list of questions**, directly in the filter question (recommended) * No program code (PHP code) required * Simple filters only * Only available for certain question types * A //[[:en:create:php-filters|PHP Filter]]// is defined under **Assemble Questionnaire** using PHP code * Allows arbitrarily complex filters * Allows the incorporation of previous answers into later questions ([[:de:create:transfer-responses]], also known as //piping//) * Requires working with PHP program code * Using [[:en:create:javascript|JavaScript]] it is possible to dynamically show/hide questions on a questionnaire page -- depending on an answer above (or below) on the same page. * Requires to work with JavaScript program code * Allows dynamic changes to the current questionnaire page * More about it: [[:en:create:dynamic]] * Will be partially integrated into //Question Filter// in future program versions **Important:** Do you use filters __and__ do you allow a back button in the questionnaire? Then please note that the data set __stores all__ responses. Even if a participant gives information on question A, then goes back, answers a filter question B differently there and question A is therefore no longer displayed at all.