Translations of this page:


string multiLevelURL(string questionnaire, [mixed data, mixed Hash])

The function multiLevelURL() works like multiLevelDown(), but does not lead the respondents directly to the subordinate questionnaire (Multi-Level Structure), but generates a URL with which the questionnaire can be called up later. The function is particularly useful in connection with sending emails, e.g. using mailSend() or mailSchedule().

  • questionnaire – The subordinate questionnaire that is called up by the URL.
  • data – (optional) Data to be made available for multiLevelData().
  • Hash – (optional) A unique value to identify the subordinate questionnaire.

By default, multiLevelURL() generates only one case and link per interview. This means that the same URL can be displayed even if the questionnaire page is called up several times with the PHP code. If different cases are to be generated, a value must be entered for the Hash.


In the following example, a case is to be created for each e-mail address in the $emails array and the link is to be sent to the respective address. The link leads to the “details” questionnaire. The e-mail address is made available in the subordinate questionnaire for multiLevelData() and at the same time used as Hash so that a different case and link is created for each e-mail address.

In this example, serial mail 1 contains a placeholder %link%, where the link is displayed.

foreach ($emails as $email) {
    $url = multiLevelURL('details', $email, $email);
    mailSend($email, 1, 0, $url);
en/create/functions/multilevelurl.txt · Last modified: 09.04.2024 16:30 by lukas.kraiger
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki