Welcome to the LimeSurvey Community Forum

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

Show Full responses in Completed page

  • agabriel
  • agabriel's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 1 week ago - 11 years 1 week ago #93405 by agabriel
Show Full responses in Completed page was created by agabriel
Hi!LS Team,

Im running a survey that give a voucher to first 2,000 people only but accept unlimited people to answer the survey.

Im wondering if LS have a javascript code that can get the Full responses in a survey. Ill be inserting this code in the completed page template

Heres a sudo code example:
Code:
function get_voucher_button{
var total_responses = {TOTAL_RESPONSES}; //i dont know the placeholder for Total Responses
  if(total_responses > 2000){
   alert("sorry you didnt qualify for this voucher")
  }else{
   alert("click here to download voucher");
  }
}

Hope you can help me.

More power

Ali
Last edit: 11 years 1 week ago by agabriel.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
11 years 1 week ago #93421 by DenisChenu
Replied by DenisChenu on topic Show Full responses in Completed page
Hello,

Maybe you can use {SAVEDID} but it take the id if user don't finish him survey.

Alternative solution: use ajax on end message or your own script at endurl.

Denis

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.
  • agabriel
  • agabriel's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 1 week ago #93496 by agabriel
Replied by agabriel on topic Show Full responses in Completed page
Hi Denis!

is there a way i can query the database using Javascript?
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
11 years 1 week ago #93497 by DenisChenu
Replied by DenisChenu on topic Show Full responses in Completed page

agabriel wrote: is there a way i can query the database using Javascript?

No, not really.

You have to use own php script and call it in AJAX: api.jquery.com/jQuery.ajax/

Denis

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 following user(s) said Thank You: agabriel
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose