Skip to content
Zotonic
  • Start
  • Guides
  • Reference
  • Releases

Live search

Search across all Zotonic content

Type at least two characters

Results are matched against titles, summaries and topics as you type.

Filters ยท mod_survey
  • Reference
  • Frontend developer
  • Surveys
  • Template filter
  • Parse
  • Text

survey_prepare_narrative

Module

mod_survey

Parse a survey narrative question into renderable text and input parts.

Text outside square brackets is HTML escaped and retained as text. A bracketed name such as [age] becomes a text input; [color=red|green|blue] becomes a select input. The result is a map containing the parsed parts list.

Edit on GitHub

Related documentation

Filters

survey_answer_split

Filter to split multi-value survey answers on the '#' character.

Filters

tokens

Returns a list of tokens from input string, separated by the characters in the filter argument.

Filters

survey_is_history_back

Test whether a survey respondent may return to the previous page in a history.

Filters

survey_page_options

Check the list of blocks and collect all options for that page.

Filters

survey_is_save_intermediate

Check if the given survey is configured to save intermediate results. Always returns a boolean value.

Filters

merge_tags

A mail-merge like filter where tag-expressions in a text are replaced with the value of their evaluation.

Filters

survey_is_pagebreak_submit

Check if a list of questions contains a pagebreak block with an unconditional submit.

Filters

from_json

Parse a string as a JSON (JavaScript Object Notation) value. The returned value can be processed futher.

Filters

truncatechars

Truncate a text to a maximum length in characters.

GitHub © 2026 Zotonic