- Posts: 6
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Show Full responses in Completed page
- agabriel
- Topic Author
- Offline
- New Member
Less
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:
Hope you can help me.
More power
Ali
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13910
- Thank you received: 2548
11 years 1 week ago #93421
by DenisChenu
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.
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
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
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
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?
is there a way i can query the database using Javascript?
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13910
- Thank you received: 2548
11 years 1 week ago #93497
by DenisChenu
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.
Replied by DenisChenu on topic Show Full responses in Completed page
No, not really.agabriel wrote: is there a way i can query the database using Javascript?
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.