listFails()

array listFails()

The function listFails() reveals which variables are responsible for the page having to be revisited. The function returns an array with the respective variable IDs.

Note: Some reasons for the page being redisplayed are not able to displayed as variable IDs, e.g. if fewer options than requested were selected in a multiple choice selection, or if the page is repeated due to a separate filter.

Example

In the following example, whether no answer was given for item „AB01_01“, or if the answer is missing (according to the response specifications set for the item) is checked. If this is the case, the text element „info_AB01_01“ is displayed with further information regarding the response format required.

$fails = listFails();
if (in_array('AB01_01', $fails)) {
  text('info_AB01_01');
}
question('AB01');