DEPENDENT COLUMNS OF ANOTHER

Mehr
1 Woche 8 Stunden her - 1 Woche 8 Stunden her #181750 von FERNANDA1206
COM_KUNENA_MESSAGE_CREATED_NEW
Hi,

I have a matrix with different response types in its rows but I would like column 5 to depend on column 4, that is, if it has the value of 1, the field to write the value is enabled, I have the following code but I have already modified it and does not allow me....
They could help me..

var showValue = '1';
$('.answer-item.answer_cell_SQ005 select', thisQuestion).on('change', function(e) {
var thisValue = $(this).val();
var thisCode = $(this).closest('.answer-item').find('input:text').attr('id').split('_')[1];
var otherInput = $('.answer-item.answer_cell_SQ006'+thisCode+' input:text', thisQuestion);
if(thisValue == showValue) {
$(otherInput).show();
}
else {
$(otherInput).hide().val('');
checkconditions($(otherInput).val(), $(otherInput).attr('name'), 'text');
}
});
// Initial states of row-4 inputs
$('.answer-item.answer_cell_SQ006 input:text', thisQuestion).hide();
$('.answer-item.answer_cell_SQ005 .inserted-select', thisQuestion).each(function(i) {
var thisValue = $(this).val();
var thisCode = $(this).closest('.answer-item').find('input:text').attr('id').split('_')[1];
var otherInput = $('.answer-item.answer_cell_SQ006'+thisCode+' input:text', thisQuestion);
if(thisValue == showValue) {
$('.answer-item.answer_cell_SQ006'+thisCode+' input:text', thisQuestion).show();
}
});
Anhang:
Last edit: 1 Woche 8 Stunden her by FERNANDA1206. Begründung: Because I add the matrix example

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

LimeSurvey Partners

Jetzt loslegen!

Melden Sie sich jetzt an, und erstellen Sie in wenigen Minuten Ihre erste Umfrage.

Account einrichten

Abonnieren Sie unseren Newsletter

Abonnieren Sie unseren Newsletter für alle Neuigkeiten rund um LimeSurvey
captcha