Welcome to the LimeSurvey Community Forum

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

passing variables data via HTTP POST to the survey.

  • wittie04
  • wittie04's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 10 months ago #201193 by wittie04
Hi,

I have question is there a posibilities to send a variables via HTTP POST to the survey? example question type is Yes/No . then we still need to insert some data on the question label. please check the screenshot.
Attachments:
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 10 months ago - 3 years 10 months ago #201199 by Joffm
As I see in your screenshot you add already a parameter to your survey URL. So why can't you add the other needed parameters.

But anyway: You always can do an ajax call to a remote script to receive some other data.
Something like this
Code:
<script type="text/javascript" charset="utf-8">
$(document).on('ready pjax:scriptcomplete',function(){
   $.post('https://www.myServer.de/getMyValue.php' , { P1: "{Param1}", P2: "{Param2}" } ,function(data) {
 
                   $('#question{QID} input[type="text"]').val(data);
 
  });
// Uncomment to hide the question
//                $('#question{QID}').hide();
});
</script>

Your screenshot is a bit confusing. I am sure you don't want to insert the first name into the question text.
And the type of question seems to be irrelevant. You only pipe something into he question text.
A bit further explanation will be appreciated.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 years 10 months ago by Joffm.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose