Welcome to the LimeSurvey Community Forum

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

Implementation eines Sliders in der 2ten Skala eines Dual Arrays.

More
1 year 5 months ago #258333 by Joffm
So,
ich habe etwas gefunden, das auch in LS 6.x. funktioniert
[url] forums.limesurvey.org/forum/can-i-do-thi...-col3?start=0#226627 [/url]
 

Jetzt könntest Du z.B. in der ersten Spalte
  • ein DropDown einbauen, s. Tutorial 1, Kap.1.
  • exclusive Checkboxen einbauen, s. Tutorial 1, Kap.9.
  • daraus etwas ganz Neues bauen
Viel Erfolg

Joffm
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: ngolub

Please Log in to join the conversation.

More
1 year 5 months ago - 1 year 5 months ago #258335 by Joffm
Ich habe jetzt etwas mit dem Beispiel in Kap.9 herumgespielt und den Slider laut angegebenem Thread eingefügt.
Das kann so etwas geben. Schönheit, Farben seien dem Benutzer überlassen.
Es sieht zwar nach radio-Button aus, verhält sich auch so; aber diese runden Dinger sind Checkboxen mit einem border-radius von 50%.
Das normalerweise erscheinende Häkchen kann man wegmachen; ich habe aber noch nicht die "halbe" Füllung bei Wahl geschafft - nur die volle Füllung.
Damit man später in den Daten nur eiunen einzigen Wert erhält kann man ja mittels einer (mehrerer) Gleichungen eine versteckte Matrixfrage besetzen, also etwa
{QM_Y001=if(Q1_Y001_X001=="Y",1,if(Q1_Y001_X002=="Y",2,if(Q1_Y001_X003=="Y",3,if(Q1_Y001_X004=="Y",4,if(Q1_Y001_X005=="Y",5,0)))))}
...
 

Joffm

Morgen mache ich noch etwas weiter.
Und schicke die lss.
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 1 year 5 months ago by Joffm.
The following user(s) said Thank You: ngolub

Please Log in to join the conversation.

More
1 year 5 months ago #258338 by Joffm
Hallo,
ich habe mir einmal den Sonntag gegönnt und noch etwas gebastelt.
Hier das Ergebnis.
 
Schaue es einmal an.
Das Prinzip habe ich ja schon erklärt.
In einer Matrix(Texte) mit sechs Spalten werden in die ersten fünf Checkboxen (jede exclusiv, dass wie bei Radio-Buttons immer nur eine angewählt werden kann) eingefügt, in die sechste ein Slider, der aus der anschließenden Frage hineingemauschelt wird. Dadurch ist auch die Speicherung gewährleistet.
Und mit etwas css sind diese Checkboxen nun rund und sehen aus wie Radio-Buttons.
Am Slider habe ich auch noch etwas herumgefummelt.

Aber das ist dann "up to you"

Der Rest ist bekannt.
Farbgebung, zusätzlicher Header, Zwischenzeilen, Tooltips (habe ich nicht vollständig implementiert; das war mir zu lang)

 

File Attachment:

File Name: limesurvey...8243.lss
File Size:57.84 KB


Ich hoffe, Du kannst etwas damit anfangen
Ach ja, die Basissprache ist leider Englisch. Ich habe eine alte Umfrage von mir "verwurstet".
Das sollte aber kein Problem sein.
Und wie auch schon geschrieben, die Speicherung ist wie bei Mehrfachnennungen.
Also entweder im Auswertetool umkodieren, oder in LimeSurvey mit der erwähnten Glaichung.
Mache ich vielleicht morgen

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: ngolub

Please Log in to join the conversation.

More
1 year 5 months ago #258356 by ngolub
Das ist wirklich eine riesige Hilfe!

Ich kann dir gar nicht genug danken – aber dennoch: Danke, danke, danke!

Ich habe mir deine .lss-Datei angeschaut, sie bei mir implementiert, und alles funktioniert, bis auf die Anzahl der Slider und die Farben der Spalten. Ich habe nur einen Slider in der ersten Reihe und nur die Headers sind gefärbt.

Ich muss dir zweimal antworten, weil der Editor im Forum hier für mich nicht funktioniert.

Ich kann zwar Bilder hochladen, aber nicht im Editor schreiben. Deswegen schreibe ich dir hier über die Schnellantwort-Funktion.

Please Log in to join the conversation.

More
1 year 5 months ago #258357 by ngolub
Update: Ich würde gerne mein lss und ein Scrennshot mit dir teilen, aber ich kann nicht einmal etwas hochladen, da das Messagefeld nicht leer sein darf und ich leider nichts dort reinschreiben kann. :/

Please Log in to join the conversation.

More
1 year 5 months ago #258360 by ngolub
Update: Die Fraben der Spalten konnte ich anpassen in dem ich das CSS von:

<style type="text/css">
/* Farbgebung der beiden Skalen */
td.answer_cell_X001,
td.answer_cell_X002,
td.answer_cell_X003,
td.answer_cell_X004,
td.answer_cell_X005,
tr.ls-header th.answertext.column1-0,
tr.ls-header th.answertext.column1-1,
tr.ls-header th.answertext.column1-2,
tr.ls-header th.answertext.column1-3,
tr.ls-header th.answertext.column1-4,
th.inserted-header.column1-1 {
background-color: rgba(255, 204, 153, 0.3);
}

td.answer_cell_X006,
tr.ls-header th.answertext.column1-5,
th.inserted-header.column1-2 {
background-color: rgba(153, 204, 255, 0.3);
}
</style>

Auf

<style type="text/css">
/* Farbgebung der beiden Skalen*/
td.answer_cell_1,
td.answer_cell_2,
td.answer_cell_3,
td.answer_cell_4,
td.answer_cell_5,
}

td.answer_cell_6,
tr.ls-header th.answertext.column1-5,
th.inserted-header.column1-2 {
background-color: rgba(153, 204, 255, 0.3);
}
</style>

änderte.

Please Log in to join the conversation.

More
1 year 5 months ago #258363 by ngolub
Update: Nach dem Clearing des Chaches kann ich hier wieder wie gewohnt posten.

So, wie bereits erwähnt wird der Slider nur in der ersten Reihe implementiert:

 

Hier ist der Code:
Code:
<p><strong>10. Wie wichtig sind die nachfolgenden General Management-Kompetenzen <u>bezogen auf Ihre aktuelle Führungsposition?</u></strong></p>
<script type="text/javascript" charset="utf-8">
 
// Script zuum Einfügen der Checkboxen anstelle der Textfelder und Einstellen der Exclusivität
 
  $(document).on('ready pjax:scriptcomplete',function(){
 
    // Identify this question
    var thisQuestion = $('#question{QID}');
 
    // Column-specific classes
    $('tr.subquestion-list', thisQuestion).each(function(i) {
      $('th, td', this).each(function(i) {
        $(this).addClass('column-'+i);
      });
    });
 
    // Insert checkboxes
    $('.answer-item.column-1, .answer-item.column-2, .answer-item.column-3, .answer-item.column-4, .answer-item.column-5', thisQuestion).addClass('custom-checkbox-item');
    $('.custom-checkbox-item', thisQuestion).each(function(i) {
      var thisID = $('input:text:eq(0)', this).attr('id');
      $('label', this).before('<input class="" id="'+thisID+'" value="Y" type="checkbox" name="'+thisID.replace(/answer/, '')+'" />');
      if($('input:text:eq(0)', this).val() == 'Y') {
        $('input:checkbox:eq(0)', this).prop('checked', true);
      }
      $(this).removeClass('text-item').addClass('checkbox-item');
      $('input:text:eq(0)', this).remove();
    });
 
    // Identify exclusive items
    $('.answer-item.column-1, .answer-item.column-2, .answer-item.column-3, .answer-item.column-4, .answer-item.column-5', thisQuestion).addClass('exclusive-item');
 
    // Listeners for exclusive items
    $('.non-exclusive-item input:checkbox', thisQuestion).on('change', function(e) {
      if($(this).is(':checked')) {
        $(this).closest('tr.subquestion-list').find('.exclusive-item input:checkbox').prop('checked', false);
      }
    });
    $('.non-exclusive-item input:text', thisQuestion).on('keyup change', function(e) {
      if($.trim($(this).val()) != '') {
        $(this).closest('tr.subquestion-list').find('.exclusive-item input:checkbox').prop('checked', false);
      }
    });
    $('.exclusive-item input:checkbox', thisQuestion).on('change', function(e) {
      if($(this).is(':checked')) {
        var thisItem = $(this).closest('.answer-item');
        $(this).closest('tr.subquestion-list').find('.answer-item').not(thisItem).find('input:checkbox').prop('checked', false);
        $(this).closest('tr.subquestion-list').find('input:text').val('');
      }
    });
  });
</script><script type="text/javascript" data-author="Tony Partner">
 
// Script zum Einfügen der Slider in die 6. Spalte der Matrix
 
  $(document).on('ready pjax:scriptcomplete',function(){
 
    // The column to receive the sliders
    var sliderColumn = 6;
 
    var thisQuestion = $('#question{QID}');
    var nextQuestion = thisQuestion.nextAll('.numeric-multi:eq(0)');
 
     // Hide the next question
    nextQuestion.hide();
 
    //Remove the core array text inputs
    $('tr[id^="javatbd"] .answer-item:nth-child('+(sliderColumn+1)+') input', thisQuestion).remove();
 
 
    // Wait for the sliders to be inititialized
    $('input:text', nextQuestion).on('slideEnabled',function(){
 
      var thisItem = $(this).closest('li');
      var thisItemIndex = thisItem.index();
 
      // Move the slider and add some styling
      $('tr[id^="javatbd"]:eq('+thisItemIndex+') .answer-item:nth-child('+(sliderColumn+1)+')', thisQuestion).append($('.slider-container', thisItem));
      $('tr[id^="javatbd"]:eq('+thisItemIndex+') .slider-container', thisQuestion)
        .removeClass('col-xs-12 col-sm-12')
        .css({
          'display': 'block',
          'padding': '25px 10px 0 10px'
        });
    });
  });
</script><script type="text/javascript" charset="utf-8">
 
// Script zum Einfügen des zusätzlichen Headers
 
  $(document).on('ready pjax:scriptcomplete',function(){
    // Insert the column categories
    $('#question{QID} table.subquestion-list thead tr:eq(0) td:eq(0)').remove();
    $('#question{QID} table.subquestion-list thead').prepend('<tr class="ls-heading">\
      <td rowspan="2" colspan="1" style="border-top:0 !important;"></td>\
      <th class="answer-text inserted-header" colspan="5">Zum gegenwärtigen Zeitpunkt<br/>(heute)</th>\
      <th class="answer-text inserted-header" colspan="1"><em>Veränderung</em> der Bedeutung zukünftig<br/>(in 5-10 Jahren)</th>\
    </tr>');
  });
</script><script type="text/javascript">
 
// Script zum Einfügen des Zwischenzeilen
// Beachte: In dieser Matrix wird "subquestion-list" angesprochen, nicht "answers-list", wie in einer eindimensionalen Matrix
 
  $(document).ready(function() {
    // Identify this question
    var thisQuestion = $('#question{QID}');
 
    // Define the sub-heading text strings with tooltip text using the title attribute
    var subHeading1 = '<strong title="Your detailed information for Leadership">Leadership</strong>';
    var subHeading2 = '<strong title="Your detailed information for Academic Environment">Handeln im akademischen Umfeld</strong>';
    var subHeading3 = '<strong title="Your detailed information for Political Environment">Handeln im politischen Umfeld</strong>';
    var subHeading4 = '<strong title="Your detailed information for Strategic Design">Strategisches Gestaltungsvermögen</strong>';
    var subHeading5 = '<strong title="Your detailed information for Business Thinking">Betriebswirtschaftliches Denken und Handeln</strong>';
    var subHeading6 = '<strong title="Your detailed information for Organizational Change">Den organisatorischen Wandel gestalten</strong>';
 
    // Find out the number of columns in the question
    var columnsLength = $('tr.subquestion-list:eq(0) > *', thisQuestion).length;
 
    // Insert the subheadings before the specific subquestions
    $('tr.subquestion-list:eq(0)', thisQuestion).before('<tr class="sub-header-row"><th colspan="'+columnsLength+'">'+subHeading1+'</th></tr>');
    $('tr.subquestion-list:eq(5)', thisQuestion).before('<tr class="sub-header-row"><th colspan="'+columnsLength+'">'+subHeading2+'</th></tr>');
    $('tr.subquestion-list:eq(10)', thisQuestion).before('<tr class="sub-header-row"><th colspan="'+columnsLength+'">'+subHeading3+'</th></tr>');
    $('tr.subquestion-list:eq(15)', thisQuestion).before('<tr class="sub-header-row"><th colspan="'+columnsLength+'">'+subHeading4+'</th></tr>');
    $('tr.subquestion-list:eq(19)', thisQuestion).before('<tr class="sub-header-row"><th colspan="'+columnsLength+'">'+subHeading5+'</th></tr>');
    $('tr.subquestion-list:eq(24)', thisQuestion).before('<tr class="sub-header-row"><th colspan="'+columnsLength+'">'+subHeading6+'</th></tr>');
 
    // Fix the row classes for styling
    var rowClass = 1;
    $('table.subquestion-list tbody tr', thisQuestion).each(function(i) {
      if($(this).hasClass('sub-header-row')) {
        rowClass = 1;
      } else {
        rowClass++;
        $(this).removeClass('array1 array2');
        if(rowClass % 2 == 0) {
          $(this).addClass('array2');
        } else {
          $(this).addClass('array1');
        }
      }
    });
    // Initialize Bootstrap tooltips
    $('[data-bs-toggle="tooltip"]').tooltip();
  });
</script><script type="text/javascript" charset="utf-8">
 
// Script zur Nummeriereung der Spalten für die individuelle Spaltenbreite
 
  $(document).on('ready pjax:scriptcomplete',function(){
    var thisQuestion = $('#question{QID}');
    // Add a question class
    thisQuestion.addClass('custom-array');
 
    // Column-specific classes
    $('table.subquestion-list tr', thisQuestion).each(function(i) {
      $('th, td', this).each(function(i) {
        $(this).addClass('column1-'+i);
      });
    });
  });
</script>
<style type="text/css">/* Individuelle Sapltenbreiten */
  .custom-array table.subquestion-list col {
    width: auto !important;
  }
 
  .custom-array table.subquestion-list thead .column1-0 {  width: 28%; }
  .custom-array table.subquestion-list thead .column1-1 {  width: 45%; }
  .custom-array table.subquestion-list thead .column1-2 {  width: 27%; }
</style>
<style type="text/css">@media (min-width: 768px) {
    .col-md-8 {
      flex: 0 0 auto;
      flex-grow: 0;
      width: 100%;
    }
  }
 
/* Teilfragentexte linksbündig */
  .ls-answers tbody .answertext {
    text-align: left;
  }
 
/* Diverse Anweisungen, um den Slider zu stylen */
  .slider.slider-horizontal {
    width: 100%;
    height: 20px;
  }
  
  .slider-handle {
    background: #007894;
  }
  
  .slider-track {
    background-image: linear-gradient(to bottom, #E2E2E2 ,#E2E2E2);
    background-repeat: repeat-x;
    box-shadow: 0;
    border-radius: 10px;
    position: absolute;
    cursor: pointer;
  }
  
   .slider-selection {
    background-image: linear-gradient(to bottom, #E2E2E2 ,#E2E2E2);
    border-radius: 10px;
  }
  
  /* Change the slider handle color */
.slider-handle.min-slider-handle.round {
  background-color: #007894;
  border: 2px solid #007894;
}
 
 
  .slider.slider-horizontal .slider-track {
    height: 20px;
    width: 100%;
    margin-top: 0;
    top: 0;
    left: 0;
    border-radius: 10px;
  }
 
  .slider-container {
    padding: 2px 2px !important;
  }
 
  /* Tooltip des Sliders, falls er überhaupt angezeigt werden soll */
  .slider .tooltip-inner {
    min-width:10px;
    height:auto;
    padding:3px 3px;
    color:#314A5B;
    text-align:center;
    font-weight:400;
    border-radius:5px;
    border: 1px solid #314A5B;
    background-color:white;
    font-size: 12px;
 }
 
  /* Diverse Anweisungen, um die ursprünglichen Checkboxen wie Radio-Buttons aussehen zu lassen */
  .checkbox-item .ls-label-xs-visibility {
    width: 18px;
    height: 18px;
  }
  .checkbox-item label::before, .checkbox-item label::after {
    border-radius: 50%;
  }
  .checkbox-item label::before {
    border-color: black;
    width:18px;
    height:18px;
  }
  .checkbox-item input[type="checkbox"]:checked + label::after {
    content:"";
    background: #007894;
    padding: 0;
  }
  #question{QID} .checkbox-item label::after {
    width: 10px;
    height: 10px;
    left: 4px;
    top: 4px;
  }
 
  .tooltip[data-toggle="tooltip"] {
    cursor: pointer;
  }
 
  /* Styles for your .mytooltip1 elements */
  .mytooltip1 {
    cursor: pointer;
    font-weight: bold;
    color: #007894;
  }
 
 
.tooltip-inner{
    min-width:500px;
    height:auto;
    padding:3px 8px;
    color:#314A5B;
    text-align:left;
    font-weight:400;
    border-radius:15px;
    border: 1px solid #314A5B;
    background-color:white;
    font-size: 16px;
  }
 
/* Farbgebung der beiden Skalen */
  td.answer_cell_1,
  td.answer_cell_2,
  td.answer_cell_3,
  td.answer_cell_4,
  td.answer_cell_5,
  tr.ls-header th.answertext.column1-0,
  tr.ls-header th.answertext.column1-1,
  tr.ls-header th.answertext.column1-2,
  tr.ls-header th.answertext.column1-3,
  tr.ls-header th.answertext.column1-4,
  th.inserted-header.column1-1 {
  background-color:  rgba(232, 225, 208);
  }
 
  td.answer_cell_6,
  tr.ls-header th.answertext.column1-5,
  th.inserted-header.column1-2 {
  background-color: rgba(211, 222, 239);
  }
  
  .sub-header-row th {
    color: #96272D;
}
</style>
<style type="text/css">/* Hide the red warning message for mandatory multiple choice questions */
  div.ls-question-mandatory-multiplechoice,
  div.ls-question-mandatory.ls-question-mandatory-other-text-danger,
  div.ls-question-mandatory.ls-question-mandatory-other,
  /* Add the class for mandatory multiple numerical input questions */
  div.ls-question-mandatory.ls-question-mandatory-array.text-danger {
      display: none;
  }
</style>

Und hier ist noch das lss.
 

File Attachment:

File Name: limesurvey...5222.lss
File Size:984.35 KB


Sieht du wo das Problem liegt?

Please Log in to join the conversation.

More
1 year 5 months ago #258367 by Joffm
Klar,
Du hast ja auch nur eine einzige Teilfrage in der "slideraktivierung". Da muss schon für jede Teilfrage der Matrix auch eine Teilfrage im Slider sein. Wo sollen die Wert sonst gespeichert werden?

Jetzt aber etwas anderes.
Dies ist ja eine etwas sklavische Umsetzung Deiner Idee.
Viel leichter wäre es natürlich, in die erste Spalte ein Dropdown zu platzieren, in die zweite Spalte den Slider.
Erspart den ganzen Heck-Meck mit den Checkboxen, den zusätzlichen Header, auch die Umkodierung der Werte am Ende.

Könnte so aussehen.
 

 

File Attachment:

File Name: limesurvey...9642.lss
File Size:96.72 KB


Joffm

Und wenn ich mal nach Züricjh komme, gibst Du mir ein Bier aus. 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: ngolub

Please Log in to join the conversation.

More
1 year 5 months ago - 1 year 5 months ago #258445 by ngolub
Vielen Dank! Wie konnte ich das nur übersehen. Das Dropdown-Menü sieht auch gut aus, aber ich bevorzuge die 5-Punkte-Skala. Natürlich, gib mir Bescheid, falls du mal nach Zürich kommst! 
Last edit: 1 year 5 months ago by ngolub. Reason: error in intitial message

Please Log in to join the conversation.

More
1 year 5 months ago #258467 by ngolub
Hallo Joffm,

mir ist noch etwas aufgefallen.

Wenn man den Slider bewegt, bevor man die Checkboxen auswählt und anschließend auf "Weiter" klickt, wird der Slider zurückgesetzt. Der Wert des Sliders wird nicht gespeichert, und man muss ihn erneut verschieben.

Weißt du, woran das liegen könnte?

Hier ist die Umfrage 

File Attachment:

File Name: limesurvey...5223.lss
File Size:1.03 MB

Please Log in to join the conversation.

More
1 year 5 months ago #258479 by Joffm
Ja, wenn man darauf gestoßen wird, kommt gleich die Erleuchtung.
Das Ganze stammt ja aus diesem Beispiel
 
Hier waren die exclusiven Checkboxen ja wirklich dazu da, auch die Textfelder zu löschen.
Wir haben aber den Slider im Textfeld, der nun nicht gelöscht werden sollte.

Also kommentiere diese Zeilen aus - oder lösche sie!
Code:
    // Listeners for exclusive items
    $('.non-exclusive-item input:checkbox', thisQuestion).on('change', function(e) {
      if($(this).is(':checked')) {
        $(this).closest('tr.subquestion-list').find('.exclusive-item input:checkbox').prop('checked', false);
      }
    });
// Dies könnte man gesamt löschen
//    $('.non-exclusive-item input:text', thisQuestion).on('keyup change', function(e) {
//      if($.trim($(this).val()) != '') {
//        $(this).closest('tr.subquestion-list').find('.exclusive-item input:checkbox').prop('checked', false);
//      }
//    });
 
    $('.exclusive-item input:checkbox', thisQuestion).on('change', function(e) {
      if($(this).is(':checked')) {
        var thisItem = $(this).closest('.answer-item');
        $(this).closest('tr.subquestion-list').find('.answer-item').not(thisItem).find('input:checkbox').prop('checked', false);
//        $(this).closest('tr.subquestion-list').find('input:text').val('');
      }
    });

Sorry

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: ngolub

Please Log in to join the conversation.

More
1 year 5 months ago #258486 by ngolub
Danke dir für die schnelle Antwort.

Habe diese Zeilen gelöscht, aber der Sliderwert wird trotzdem nicht gespeichert, wenn ich es vor dem anklicken der Checkboxes verschiebe.

Das habe ich gelöscht:
Code:
// Dies könnte man gesamt löschen
//    $('.non-exclusive-item input:text', thisQuestion).on('keyup change', function(e) {
//      if($.trim($(this).val()) != '') {
//        $(this).closest('tr.subquestion-list').find('.exclusive-item input:checkbox').prop('checked', false);
//      }
//    });

Please Log in to join the conversation.

More
1 year 5 months ago - 1 year 5 months ago #258488 by Joffm
Und die Zeile unten auch auskommentiert?

//        $(this).closest('tr.subquestion-list').find('input:text').val('');

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

Please Log in to join the conversation.

More
1 year 5 months ago #258492 by ngolub
Ja, das habe ich auch gemacht.

Der erste Script sieht so aus:
Code:
<script type="text/javascript" charset="utf-8">
 
// Script zuum Einfügen der Checkboxen anstelle der Textfelder und Einstellen der Exclusivität
 
  $(document).on('ready pjax:scriptcomplete',function(){
 
    // Identify this question
    var thisQuestion = $('#question{QID}');
 
    // Column-specific classes
    $('tr.subquestion-list', thisQuestion).each(function(i) {
      $('th, td', this).each(function(i) {
        $(this).addClass('column-'+i);
      });
    });
 
    // Insert checkboxes
    $('.answer-item.column-1, .answer-item.column-2, .answer-item.column-3, .answer-item.column-4, .answer-item.column-5', thisQuestion).addClass('custom-checkbox-item');
    $('.custom-checkbox-item', thisQuestion).each(function(i) {
      var thisID = $('input:text:eq(0)', this).attr('id');
      $('label', this).before('<input class="" id="'+thisID+'" value="Y" type="checkbox" name="'+thisID.replace(/answer/, '')+'" />');
      if($('input:text:eq(0)', this).val() == 'Y') {
        $('input:checkbox:eq(0)', this).prop('checked', true);
      }
      $(this).removeClass('text-item').addClass('checkbox-item');
      $('input:text:eq(0)', this).remove();
    });
 
    // Identify exclusive items
    $('.answer-item.column-1, .answer-item.column-2, .answer-item.column-3, .answer-item.column-4, .answer-item.column-5', thisQuestion).addClass('exclusive-item');
 
    // Listeners for exclusive items
    $('.non-exclusive-item input:checkbox', thisQuestion).on('change', function(e) {
      if($(this).is(':checked')) {
        $(this).closest('tr.subquestion-list').find('.exclusive-item input:checkbox').prop('checked', false);
      }
    });
// Dies könnte man gesamt löschen
//    $('.non-exclusive-item input:text', thisQuestion).on('keyup change', function(e) {
//      if($.trim($(this).val()) != '') {
//        $(this).closest('tr.subquestion-list').find('.exclusive-item input:checkbox').prop('checked', false);
//      }
//    });
 
    $('.exclusive-item input:checkbox', thisQuestion).on('change', function(e) {
      if($(this).is(':checked')) {
        var thisItem = $(this).closest('.answer-item');
        $(this).closest('tr.subquestion-list').find('.answer-item').not(thisItem).find('input:checkbox').prop('checked', false);
//        $(this).closest('tr.subquestion-list').find('input:text').val('');
      }
    });
 
</script>

Please Log in to join the conversation.

More
1 year 5 months ago #258494 by Joffm
Gut, ich muss natürlich sagen, dass ich dies in meinem Kurzbeispiel gemacht habe, und das läuft.
Vorher eben nicht.
 

File Attachment:

File Name: limesurvey...3-12.lss
File Size:57.86 KB

Dann muss ich mir wohl doch Deine lss mal ansehen.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: ngolub

Please Log in to join the conversation.

Moderators: holchJoffmtpartner

Lime-years ahead

Online-surveys for every purse and purpose