Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
en:create:placeholders [10.02.2015 15:12] – [Customized Placeholder Rules] add min. placeholder length in i1170 msd-mediaen:create:placeholders [23.03.2021 22:28] – [Outline] sophia.schauer
Line 32: Line 32:
 </code> </code>
  
-The PHP function ''[[:en:create:functions:prepare_input|prepare_input()]]'' is used place input fields freely. The chapter [[:en:create:inputs-single|Placing Input Fields Freely]] describes the use of placeholders in this case. +In addition, there are some predefined placeholders (see belowand the possibility to place input fields (from other questions) using placeholders [[:en:create:inputs-single|free]].
  
 ===== Placeholders and Filters ===== ===== Placeholders and Filters =====
Line 68: Line 67:
 The following placeholders are automatically available: these IDs are __not__ allowed to be used for user-defined placeholders. The content of the placeholders can be called up for further use by using the PHP function (see column on the right). The following placeholders are automatically available: these IDs are __not__ allowed to be used for user-defined placeholders. The content of the placeholders can be called up for further use by using the PHP function (see column on the right).
  
-^ID^Description^Variable in Data^PHP Function^+^Placeholder^Description^Variable in Data^PHP Function^ 
 +|''%caseLanguage%''| Ongoing Questionaire Language [Language-Code] |LANGUAGE|''[[:en:create:functions:getlanguage]]''|
 |''%caseNumber%''|Ongoing Questionnaire Number|CASE|''[[:en:create:functions:casenumber|caseNumber()]]''| |''%caseNumber%''|Ongoing Questionnaire Number|CASE|''[[:en:create:functions:casenumber|caseNumber()]]''|
 |''%caseSerial%''|Questionnaire Authorization Code |SERIAL|''[[:en:create:functions:caseserial|caseSerial()]]''| |''%caseSerial%''|Questionnaire Authorization Code |SERIAL|''[[:en:create:functions:caseserial|caseSerial()]]''|
 |''%caseToken%''|Internal Questionnaire ID|-|''[[:en:create:functions:casetoken|caseToken()]]''| |''%caseToken%''|Internal Questionnaire ID|-|''[[:en:create:functions:casetoken|caseToken()]]''|
 |''%reference%''|Reference Given to the Questionnaire|REF|''[[:en:create:functions:reference|reference()]]''| |''%reference%''|Reference Given to the Questionnaire|REF|''[[:en:create:functions:reference|reference()]]''|
 +
 +The following placeholders are available within an item or option (e.g., in the item text). The numbering helps, e.g., to give randomly rotated options continuous numbers.
 +
 +^Placeholder^Description^Example^
 +|''%i.n.%''|Position of the item within the question plus point and blank|1. |
 +|''%i.a)%''|Position of the item (lower case letter) plus bracket|a) |
 +|''%i.num%''|Position of the item (numeric)|1|
 +|''%i.num.a%''|Position of the item (lower case letter)|a|
 +|''%i.num.A%''|Position of the item (upper case letter)|A|
 +|''%i.cnt%''|Number of items within the question|5|
  
 The following placeholders are designated for use exclusively in the HTML template of a layout.  The following placeholders are designated for use exclusively in the HTML template of a layout. 
  
-^ID^Description^+^Placeholder^Description^
 |''%logo%''|HTML code for the active logo| |''%logo%''|HTML code for the active logo|
 |''%imprint%''|HTML code for the footer/contact information| |''%imprint%''|HTML code for the footer/contact information|
Line 88: Line 98:
 If you are using customized placeholders, please take the following ID requirements into consideration: If you are using customized placeholders, please take the following ID requirements into consideration:
  
-  * A character must follow directly after the first percentage sign (''%'') (no spaces).+  * A character must follow directly after the first percentage sign (''%'') (no spaces, no number).
   * No spaces before the closing percentage sign.   * No spaces before the closing percentage sign.
   * No other percentage signs can be written between the percentage signs (''%...%'').   * No other percentage signs can be written between the percentage signs (''%...%'').
en/create/placeholders.txt · Last modified: 23.03.2021 22:44 by sophia.schauer
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki