Welcome to the LimeSurvey Community Forum

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

Edit Content of Public Statistics Page

More
8 years 2 months ago #130592 by lando
Hi Folks,

i set up a very very simple survey, one question - three answers.
At the end of the survey the Public Statistics Page gets loaded.

I want to do this:
Hide "No Answers" Line
Hide "Not finished or not shown"
Hide the Count of Answers generally so only percentages values will show up.

I think this is not possible with css but maybe javascript.

Thanks
Lando
The topic has been locked.
More
8 years 2 months ago #130602 by Ben_V
Replied by Ben_V on topic Edit Content of Public Statistics Page
Please have a look here ;)

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 following user(s) said Thank You: lando
The topic has been locked.
More
8 years 2 months ago - 8 years 2 months ago #130621 by lando
Replied by lando on topic Edit Content of Public Statistics Page
Cool, i got rid of the "No Answers" Line and the "Not finished or not shown" Line.

I used this code in template.js:
Code:
$(document).ready(function() {
        if ($('.statisticstable').length > 0) {
                $('.statisticstable td').filter(function() {
                        return $.trim($(this).text()) == 'No answer';
                }).closest('tr').hide();
        }
});

Unfortunately i am not smart enough to figure out how i could get rid of the "Count of Answers".
I cant address them by a string value like the others (i am a java-script noob).

Maybe someone could help?
Last edit: 8 years 2 months ago by lando.
The topic has been locked.
More
8 years 2 months ago #130625 by Ben_V
Replied by Ben_V on topic Edit Content of Public Statistics Page

lando wrote: how i could get rid of the "Count of Answers ?

Have a look to source code.... Maybe correct related html elements are thead...not td

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 following user(s) said Thank You: lando
The topic has been locked.
More
8 years 2 months ago - 8 years 2 months ago #130626 by lando
Replied by lando on topic Edit Content of Public Statistics Page
Hi Ben, thanks for your time. I already got rid of the headings.
I think i stated my question misunderstandable.
I want to get rid of the count-values.

Example:
Answer1 3 30%
Answer2 6 60%
Answer3 1 10%

If i try
Code:
return $.trim($(this).text()) < '999';
it also removes the percentage-Values :huh:

EDIT: SOLVED
Code:
return $.trim($(this).text()) < 999;
Last edit: 8 years 2 months ago by lando. Reason: solved
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose