Welcome to the LimeSurvey Community Forum

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

Matriz Texto y desplegables con campo de texto deshabilitado

  • direyesm
  • direyesm's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
1 year 8 months ago #230811 by direyesm
Ayúdenos a ayudarle y rellene los siguientes campos:.
Su versión de LimeSurvey: Versión 4.3.4+200713
Servidor propio o LimeSurvey Cloud: propio
Plantilla de diseño utilizada: Green
==================
Hola buenas tengo unas dudas de como poder deshabilitar campo de texto en matriz
Tengo una pregunta múltiple mas una matriz básica con filtro array, tengo otra matriz texto con desplegables que quiere que cuando me seleccioné la variable que no sea otro me deshabilite esta casilla nose si se puede hacer
*es para web solamente*


 

File Attachment:

File Name: Maquinas.lss
File Size:53 KB

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 8 months ago #230837 by Joffm
Cambia el parte "listeners"
Code:
        // Listeners
        $('.inserted-select', thisQuestion).on('change', function(i) {
            if($(this).val() != '') {
                $(this).closest('.answer-item').find('input:text').val($.trim($('option:selected', this).text())).trigger('change');
            }
            else {
                $(this).closest('.answer-item').find('input:text').val('').trigger('change');
            }
      
           // 2nd column conditional on 1st column
           if($(this).closest('.answer-item').hasClass('answer_cell_X001')) {
             handleColumnX002($(this));
          }
        });
 
        function handleColumnX002(thisSelect) {
          var thisRow = $(thisSelect).closest('tr.subquestion-list');
          var item2 = $('.answer_cell_X002', thisRow);
          if($(thisSelect).val() == '17') {
            $('input:text', item2).val('').prop('readonly', false).trigger('change');
          }
          else {
             $('input:text', item2).val('N/A').prop('readonly', true).trigger('change');
          }
        }
  
 
  
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • direyesm
  • direyesm's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
1 year 8 months ago #230851 by direyesm
Gracias por tu rápida ayuda, me funciono

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose