Translations of this page:
 

multiLevelData()

mixed multiLevelData()

In the subordinate questionnaire, the function multiLevelData() returns the data that was specified as the second parameter in multiLevelDown().

For details on the multi-level function, see Multi-Level Design.

Example

For example, the superordinate questionnaire can pass a serial number and a description:

$i = loopIndex();
$num = $i + 1;
$desc = value(id('AB01', $num));
// Create an array with two elements for number and description
$data = array(
  'num' => $num,
  'desc' => $desc
);
// Call the subordinate questionnaire "sub01" and pass this data
multiLevelDown('sub01', $data);

In the subordinate questionnaire, this data can then be used:

$data = multiLevelData();
html('<p>Number '.$data['num'].'</p>');
replace('%title%', $data['desc']);
en/create/functions/multileveldata.txt · Last modified: by 127.0.0.1
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki