Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: Text of multiple choice question to use in detailed admin notification

Text of multiple choice question to use in detailed admin notification 4 Monate 2 Wochen her #105814

  • gavleborg
  • gavleborgs Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 6
  • Karma: 0
I have a multiple choice question with three choices. I want to display the question using Qcodes, and only the selected choices, in a detailed admin notification e-mail.

Question text
I've tried to use {Q1.question} do display the question text, but it doesn't work with the multiple choice question type, works fine with list radio and long text question types.

How can I display the question text of a multiple choice question?

Selected choices
Do i need to use if() and isempty(Q1_1) to decide if a choice has been selected, or is there an easier way?

Example
Question text: What colors do you like
Choice 1: Red (user selected)
Choice 2: Green
Choice 3: Blue (user selected)

Output in notification e-mail:
What colors do you like
Red
Blue
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Text of multiple choice question to use in detailed admin notification 4 Monate 2 Wochen her #105820

  • tpartner
  • tpartners Avatar
  • ONLINE
  • LimeSurvey Team
  • Beiträge: 4054
  • Dank erhalten: 740
  • Karma: 341
I think you'll need to use something like this:

{if(Q1_SQ001 == "Y", Q1_SQ001.shown, "")}

.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Text of multiple choice question to use in detailed admin notification 4 Monate 2 Wochen her #106041

  • gavleborg
  • gavleborgs Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 6
  • Karma: 0
I did it like this:
{if(!is_empty(Q1_1),Q1_1.shown + "<br />",'')}
...
{if(!is_empty(Q1_6),Q1_6.shown + "<br />",'')}
{if(!is_empty(Q1_other),Q1_other + "<br />",'')}

The advantage of using the is_empty() function is that I do not need to know what value is stored in the variable.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Moderatoren: ITEd
Ladezeit der Seite: 0.318 Sekunden
Donation Image