Welcome to the LimeSurvey Community Forum

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

Input radio (Hidden Options)

More
5 years 1 month ago #219248 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.
More
5 years 1 month ago - 5 years 1 month 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.06 KB


Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 5 years 1 month ago by Joffm.
The following user(s) said Thank You: apollopa
The topic has been locked.
More
5 years 1 month ago #219287 by apollopa
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.
Moderators: holch, tpartner

Lime-years ahead

Online-surveys for every purse and purpose