Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Matrixfragen mit je einer Teilfrage mit offener Antwortoption

  • Joffm
  • Joffm's Avatar Topic Author
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 1 week ago - 1 year 1 week ago #241521 by Joffm
So schwer wäre die Anpassung gar nicht gewesen.

Du siehst ja im source code dies
        // Identify the questions
        var thisQuestion = $('#question'+{QID}+'');
        var nextQuestion1 = $(thisQuestion).nextAll('.text-short:eq(0)');

        var nextQuestion2 = $(thisQuestion).nextAll('.text-short:eq(1)');
        var nextQuestion3 = $(thisQuestion).nextAll('.text-short:eq(2)');

        var nextQuestions = $(nextQuestion1).add(nextQuestion2).add(nextQuestion3);

Das heißt, es werden drei "nächste Fragen" vom Typ "kurzer Text" angesprochen. Du hast aber nur eine; also lösche die Zeilen mit "nextQuestion2" und "nextQuestion3".
Am Ende werden dies drei Fragen alle in "nextQuestions" hineinaddiert.
Also löschst Du auch hier ".add(nextQuestion2)" und ".add(nextQuestion3)"

.Das ist alles.

Joffm

P.S.
Natürlich darf die Frage dann keine Pflichtfrage mehr sein; dann müsste ja immer ein "Sonstiges" eingetragen werden.
Das musst Du dann eben validieren.

P.P.S.
Ich weiß nicht, woher Du dieses script hast.
Zumindest ist es nicht völlig für diese Deine Version geeignet.
Erkennt man daran, dass die IDs "movesubmitbtn" und "movenextbtn" angesprochen werden.
Diese IDs gibt es seit Version 3.x. nicht mehr.

Daher lies einmal mein "Tutorial 1: Matrizen", Kap. 3.2.
Sollte hier im deutschen Teil auf Seite 2 sein.

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 1 year 1 week ago by Joffm.

Please Log in to join the conversation.

Moderators: Joffm

Lime-years ahead

Online-surveys for every purse and purpose