[[show()]]
This translation is older than the original page and might be outdated. See what has changed.
Translations of this page:
 

show()

The function show() combines question() and text(), but only for texts in the question catalogue, not under Text Modules and Labels. The function displays the corresponding element from the question catalogue, whereby the display parameters are passed as an array.

void show(string|array identifier, [array display options])

  • Identifier
    • (string) The four-digit identifier is made up of the two-digit identifiers of the category and question or text. It is specified as a string (in inverted commas).
    • (array) If an array with several question IDs is specified, a combined question is displayed.
  • Display options – Display options with the following keys and placeholders.
    • placeholder for use in the question, as a string with a percent sign, e.g., '%offer%' => 'SoSci'.
    • 'items' (array) – A list of items or item intervals, e.g., 'items' => [1,2,'5-7',10], if an empty array is specified, the question will not be displayed.
    • 'residuals' (array) – Codes of the residual options to be displayed.
    • 'className' (string) – A CSS class to be used for the HTML element of the question.
    • 'spacing' (int) – Distance below the question (in pixels).
    • 'gap' (int|string) – Distance between the elements of a combined question.
      • Number (e.g. 60) – Distance in pixels
      • 'line' – Separating line (distance 24 pixels)
      • 'line+<number>' (e.g. 'line+60') for a separator line with defined spacing
    • 'title' (bool) – Hide question title with false: '%title%' => false.
    • 'explanation' (bool) – Hide explanations with false: '%explanation%' => false.
    • 'filter' (mixed) – A question-specific filter, e.g. the codes from which a random generator may draw.
en/create/functions/show.txt · Last modified: 24.01.2025 19:01 by sema.altunoglu
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki