====== multiLevelURL() ====== ''string **multiLevelURL**(string //questionnaire//, [mixed //data//, mixed //Hash//])'' The function ''multiLevelURL()'' works like ''[[:en:create:functions:multileveldown]]'', but does not lead the respondents directly to the subordinate questionnaire ([[:en:create:multilevel]]), 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 ''[[:en:create:functions:mailsend]]'' or ''[[:en:create:functions:mailschedule]]''. * //questionnaire// -- The subordinate questionnaire that is called up by the URL. * //data// -- (optional) Data to be made available for ''[[:en:create:functions: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//. ===== Example ===== 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 ''[[:en:create:functions: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); }