Translations of this page:
 

This is an old revision of the document!


listFails()

array listFails()

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

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

Example

In the following example, whether no answer was given, or if an answer is missing in item “AB01_01” is checked (according to the response specifications set for the item). 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');
en/create/functions/listfails.1421431937.txt.gz · Last modified: 16.01.2015 19:12 by alexander.ritter
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki