0 votes
in SoSci Survey (dt.) by s109993 (10.2k points)
closed by s109993

Ich will eine Frage anzeigen lassen, wenn die ersten zwei Zahlen der Serial einen bestimmten Wert haben.

$t =caseSerial();
html($t);
$t2 =  substr($t, 0, 2);
html($t2);

if ($t2 = "21") {
  question('C009');
} 

if ($t2 = "23") {
  question('C008');
}

Die beiden html Anzeigen sind zur Kontrolle. AUch habe ich eine if-else Kombi probiert. Mir wird allerdings immer nur die Frage C009 oder beide Fragen angezeigt. Jemand eine Ahnug woran es liegen kann?

closed with the note: Found solution: use "=="

Willkommen im Online-Support von SoSci Survey.

Hier bekommen Sie schnelle und fundierte Antworten von anderen Projektleitern und direkt von SoSci Survey.

→ Eine Frage stellen


Welcome to the SoSci Survey online support.

Simply ask a question to quickly get answers from other professionals, and directly from SoSci Survey.

→ Ask a Question

...