Welcome to the LimeSurvey Community Forum

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

How can I integrate a JS library that saves the data for each question?

  • Antoalree_281242
  • Antoalree_281242's Avatar Topic Author
  • Offline
  • Banned
  • Banned
More
2 years 7 months ago #218616 by Antoalree_281242
Hello everybody, 
I need to understand how I can integrate/activate a JS library into a template; more precisely what I need is that, after making the library work, I can save the data obtained from the library for each question separately.
For example, if I am using a library that saves eye-tracking data and I have 10 questions in the survey, what I'd like to do is save for each question the data telling me where the person that took the survey looked during that question and be able to look at it afterwards. I am struggling because I don't know how to do that... I don't know if I explained good enough (english is not my native language, sorry).
I think that only editing the survey theme and putting the library as a script in the source isn't enough, I may have to edit the question theme separately but right now Lime Survey doesn't allow you to edit the question themes, so what could I do? Download LS from the website and edit the question theme, but then how can I make it possible that someone else could use the integration I made?
I am a bit lost, I don't know how to proceed in general. Thanks in advance to everyone that will answer. 
 
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 7 months ago #218621 by DenisChenu
It's not a JS library here : you need a way to save data.

Then : it's a complete plugin system in my opinion.

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.
  • Antoalree_281242
  • Antoalree_281242's Avatar Topic Author
  • Offline
  • Banned
  • Banned
More
2 years 7 months ago - 2 years 7 months ago #218626 by Antoalree_281242
I didn't understand what you said.
Btw yes, I have to make a plug-in but I don't know how to proceed.
Last edit: 2 years 7 months ago by Antoalree_281242.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 7 months ago #218629 by tpartner

It's not a JS library here : you need a way to save data.
Then : it's a complete plugin system in my opinion.

Most JS libraries have events when data is collected. You should be able record the data in the LS inputs when those events are triggered. Details would depend on the API of the library.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 7 months ago #218634 by DenisChenu

It's not a JS library here : you need a way to save data.
Then : it's a complete plugin system in my opinion.Most JS libraries have events when data is collected. You should be able record the data in the LS inputs when those events are triggered. Details would depend on the API of the library.

test ?

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.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 7 months ago #218635 by DenisChenu

It's not a JS library here : you need a way to save data.

Then : it's a complete plugin system in my opinion.Most JS libraries have events when data is collected. You should be able record the data in the LS inputs when those events are triggered. Details would depend on the API of the library.
Yes : but then : need to create a input on each group to fill the json. Seems complex except if it's a one shot.

> Btw yes, I have to make a plug-in but I don't know how to proceed.

Samples : github.com/LimeSurvey/LimeSurvey/tree/ma...ication/core/plugins + gitlab.com/SondagesPro + manual.limesurvey.org/Available_third_party_plugins

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.
  • Antoalree_281242
  • Antoalree_281242's Avatar Topic Author
  • Offline
  • Banned
  • Banned
More
2 years 7 months ago #218637 by Antoalree_281242
I am sorry but I'm really not understanding what you're telling me, could you explain it again?
The topic has been locked.
  • Antoalree_281242
  • Antoalree_281242's Avatar Topic Author
  • Offline
  • Banned
  • Banned
More
2 years 7 months ago #218638 by Antoalree_281242
Again, I'm having troubles understanding what you're telling me. Could you explain to me what you're saying?
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 7 months ago #218675 by holch

Again, I'm having troubles understanding what you're telling me. Could you explain to me what you're saying?

Then I don't think you'll be able to implement the solution by yourself anyway, you will need to find someone who understands these explanations.

What Tpartner suggests is have the javascript library to write the collected data from your eye-tracking into a hidden limesurvey question (e.g. a text question that you hide via CSS - NOT via the GUI option "always hide this question").

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 7 months ago #218676 by holch
Oh, I just saw that the user is blocked. What happened?

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
More
2 years 7 months ago #218688 by killmeplease
Sorry, it was me. I realized I explained my problem really bad and I couldn't find a way to delete the post (so that I could re-write it) so I just.. deleted the account(?)
But the post is still there for some reason :<
Anyway you already answered me on the other post I made about this ( forums.limesurvey.org/forum/development/...ed-from-a-js-library ) so thank you here too.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose