Welcome to the LimeSurvey Community Forum

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

semantic differential

More
10 years 9 months ago #114800 by lime_enpres
Replied by lime_enpres on topic semantic differential
WE can start a new topic for our problem but the problem is very hard to explain without the previous discussion.

We are beginners in JavaScript. But I think you see it already^^. Therefore we have no idea how to adjust any easy term in JavaScript. We need the finish expression for our problem. Then we can use it. Please

To our question types:
We use in our survey both, table questions and list (radio) questions. We thought (maybe falsely) the problem is the same for any question type apart from the special expression in java. Like the expression in java for renaming the “no-answer” field.

Thx for Help
The topic has been locked.
More
10 years 9 months ago #114806 by Ben_V
Replied by Ben_V on topic semantic differential
Fo radio buttons questions, try to paste the following code in your question text after adapting "aoq" by your correct answer option code (i.e A6, 6 etc... ).
Code:
<script type="text/javascript" charset="utf-8">
  $(document).ready(function() { 
  $('#javatbd{SID}X{GID}X{QID}aoq').hide();
  });
</script>
.

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
The topic has been locked.
More
10 years 9 months ago #114812 by lime_enpres
Replied by lime_enpres on topic semantic differential
This code would solve our problem perfectly. Thanks for that.

Only problem we have now is that the "no answer" option is added by LimeSurvey with an answer code which is unknown (at least for us)

Therefore we don´t know with which code we have to replace "aoq".
The topic has been locked.
More
10 years 9 months ago #114813 by tpartner
Replied by tpartner on topic semantic differential
To hide the last item in any select-radio type question, add this to the source of that question:

Code:
<script type="text/javascript" charset="utf-8">  
  $(document).ready(function() {    
    $('#question{QID} li.answer-item:last').hide();
  });
</script>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: Ben_V
The topic has been locked.
More
10 years 9 months ago #114818 by Ben_V
Replied by Ben_V on topic semantic differential
oups.. that's true... So try Tony's code... or better to say use Tony's code, because Tony's snippets are ALWAYS working :cheer:

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose