Welcome to the LimeSurvey Community Forum

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

Show survey data total

More
5 years 7 months ago #174739 by jelo
Replied by jelo on topic Show survey data total

flasher44 wrote: IT WORKS !!!!
Thank you so much for your help guys !!!

And what did you change? After trying everything ;-)

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • flasher44
  • flasher44's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 years 6 months ago #174756 by flasher44
Replied by flasher44 on topic Show survey data total
The print option display … LOL
The topic has been locked.
  • flasher44
  • flasher44's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 years 6 months ago #174757 by flasher44
Replied by flasher44 on topic Show survey data total
I'm trying to personalize your script, and I would like to get the display of firstname, lastname and survey name, here what I did, none value are returned for names ...
Code:
 
<div> 
  {% set bird1SGQA = processString('{SPECIES_BI1_SQ001.SGQA}') %}
  {% set aResponses = getAllTokenAnswers(aSurveyInfo.sid) %}
  {% set responseSum = 0 %}
  {% set responseCount = 0 %}
  {% set responseToken = '' %}
        {% set responseFirstname = '' %}
  {% set responseLastname = '' %}
 
 
  {% for response in aResponses %}
    {% if (response[bird1SGQA] != '') %}
      {% set responseSum = responseSum + response[bird1SGQA]|number_format %}
      {% set responseCount = responseCount + 1 %}
    {% endif %}
 
    {% if (loop.index == 1) %}
      {% set responseToken = response['token'] %}
    {% endif %}
 
               {% if (loop.index == 1) %}
      {% set responseToken = response[firstname] %}
    {% endif %}
 
                {% if (loop.index == 1) %}
      {% set responseToken = response[lastname] %}
    {% endif %}
 
  {% endfor %}
 
  {% if (responseCount > 0) %}
    There are {{ responseCount }} valid responses for Q1,  {{ lastname }} {{ firstname }}with token value {{ responseToken }}.
    <br />
    The sum of all valid responses  is {{ responseSum }}.
    <br />
    The average of all valid responses is {{ (responseSum/responseCount) }}.
  {% endif %}
</div>
 
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 6 months ago #174763 by tpartner
Replied by tpartner on topic Show survey data total
The token firstname and lastname are not returned by the getAllTokenAnswers(aSurveyInfo.sid)[\i] function.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • flasher44
  • flasher44's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 years 6 months ago #174767 by flasher44
Replied by flasher44 on topic Show survey data total
Si what is the solution ? {FIRSTNAME} does not work either in the completed page ...
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 6 months ago #174781 by tpartner
Replied by tpartner on topic Show survey data total
Try {TOKEN:FIRSTNAME}.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 6 months ago #174784 by DenisChenu
Replied by DenisChenu on topic Show survey data total

tpartner wrote: Try {TOKEN:FIRSTNAME}.

or processString('{TOKEN:FIRSTNAME}') in a twig file ;)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • flasher44
  • flasher44's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 years 6 months ago #174788 by flasher44
Replied by flasher44 on topic Show survey data total
None are working ...
The topic has been locked.
  • flasher44
  • flasher44's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 years 6 months ago #174828 by flasher44
Replied by flasher44 on topic Show survey data total
Nobody knows how to return in the completed page, the firstname, lastname and forum name ?

I would like a message after survey completion :

Thank you Paul Newman, for your participation at "BIRD COUNT SURVEY".
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
5 years 6 months ago #174830 by LouisGac
Replied by LouisGac on topic Show survey data total
you must turn on public statistics, else session is destroyed in the completed page.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 6 months ago #174865 by DenisChenu
Replied by DenisChenu on topic Show survey data total
And for token : your survey must be not anonymous.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • flasher44
  • flasher44's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 years 6 months ago #174876 by flasher44
Replied by flasher44 on topic Show survey data total
Public statitics are ON, Survey is not anonymous, but processString('{TOKEN:FIRSTNAME}') or {TOKEN:FIRSTNAME} are not returning anything ...
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose