Welcome to the LimeSurvey Community Forum

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

Access variables inserted using RemoteControl 2 API in relevance equation

  • zuercher8353
  • zuercher8353's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 1 week ago #214683 by zuercher8353
Thank you very much tpartner.

I managed to get it to work. However, I decided to do some stuff different then I described it before, I will try to explain my current approach so that if people have a similar problem can profit.

Im using Microsoft Botframework and integrate it into a Limsurveyquestion using the JavaScript Ui component from BotFramework-WebChat (Github: github.com/microsoft/BotFramework-WebChat ).

From the Botframework I can send events, that I can receive using JavaScript (example code can be found here: github.com/microsoft/BotFramework-WebCha...oming-activity-event ).

The data of the events I can then use to prefill a question that is hidden using the CSS class "hidden". The code that i use for this look like this:

window.addEventListener('webchatincomingactivity', ({ data }) => {
console.log(`Received an activity of type "${data.type}":`);
console.log(data);
if(data.type === "event"){
$("#answer8944X7X28").val(data.value).trigger('keyup');

}
});
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Online
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 1 week ago #214709 by DenisChenu
If you're API is already in javascript : cleraly : best is adding it in an hidden (by css) question :)

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.

Lime-years ahead

Online-surveys for every purse and purpose