Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: Show Full responses in Completed page

Show Full responses in Completed page 1 Jahr 8 Monate her #93405

  • agabriel
  • agabriels Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 9
  • Karma: 0
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:
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
Letzte Änderung: 1 Jahr 8 Monate her von agabriel.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Show Full responses in Completed page 1 Jahr 8 Monate her #93421

  • DenisChenu
  • DenisChenus Avatar
  • OFFLINE
  • Moderator Lime
  • Beiträge: 6551
  • Dank erhalten: 869
  • Karma: 257
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
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Show Full responses in Completed page 1 Jahr 8 Monate her #93496

  • agabriel
  • agabriels Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 9
  • Karma: 0
Hi Denis!

is there a way i can query the database using Javascript?
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Show Full responses in Completed page 1 Jahr 8 Monate her #93497

  • DenisChenu
  • DenisChenus Avatar
  • OFFLINE
  • Moderator Lime
  • Beiträge: 6551
  • Dank erhalten: 869
  • Karma: 257
agabriel schrieb:
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
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Folgende Benutzer bedankten sich: agabriel
Moderatoren: ITEd
Ladezeit der Seite: 0.137 Sekunden
Donation Image