Welcome to the LimeSurvey Community Forum

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

Input radio (Hidden Options)

  • apollopa
  • apollopa's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 8 months ago #219248 by apollopa
Input radio (Hidden Options) was created by apollopa
Code:
Olá, tudo bem?
 
Tenho o seguinte código:
 
<script type="text/javascript" charset="utf-8">
   $(document).ready(function() {
     if ({INSERTANS:575762X1159X128531}==1){
        $('#answer575762X1160X128541').attr('hidden', 'hidden');
        $('#answer575762X1160X128543').attr('disabled', 'disabled');
     } else if ({INSERTANS:575762X1159X128531}==2){
        $('#answer575762X1160X128542').attr('disabled', 'disabled');
        $('#answer575762X1160X128544').attr('disabled', 'disabled');
     }
   });
</script>
 
Estou tentando ocultar opções, utilizando o .attr('hidden','hidden'), mas não funciona! Alguém sabe como posso resolver esta situação?
Anexei o estudo.
 
Obrigado.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 8 months ago - 2 years 8 months ago #219260 by Joffm
Replied by Joffm on topic Input radio (Hidden Options)
Olá,

aqui a solução usual
 

File Attachment:

File Name: limesurvey...5762.lss
File Size:27 KB


Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 2 years 8 months ago by Joffm.
The following user(s) said Thank You: apollopa
The topic has been locked.
  • apollopa
  • apollopa's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 7 months ago #219287 by apollopa
Replied by apollopa on topic Input radio (Hidden Options)
Oi Joffm,

Muito obrigado pela solução usual!

Observando a estrutura de exemplo compartilhada, entendo que não é possível combinar os dois comportamentos "disabled" e "hidden", certo?

É muito arriscado utilizar CSS ou JS?

Obrigado!!!
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose