Welcome to the LimeSurvey Community Forum

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

Recording multiple click co-ordinates as a "on demand" question

  • TomPH01
  • TomPH01's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 4 months ago - 2 years 4 months ago #240583 by TomPH01
Please help us help you and fill where relevant:
Your LimeSurvey version: Community Edition, Version 5.4.5+221010
Own server or LimeSurvey hosting: Own Server
==================
Hi all,

I'm looking to build upon a previously answered question here
I want to record a user's clicks on an image as a series of co-ordinates to build a heatmap from the output.
The script provided from the forum post linked allows you to capture the co-ordinates of a single click and pass those as a percentage to a short text answer. I've copied the script below this question text for quick reference.

I'm wondering if it's possible to take this a step further and essentially create an "on demand" question that will record multiple clicks up to a maximum that, I'm guessing, could be set in the question's settings.

Is this even doable? Is there a better way?

Warning: Spoiler!
Last edit: 2 years 4 months ago by TomPH01. Reason: Tidied up copied code in the spoiler

Please Log in to join the conversation.

  • TomPH01
  • TomPH01's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 4 months ago #240584 by TomPH01
Apologies for the code in the spoiler. I tried to tidy it up, but the forum thinks I'm trying to spam! A much neater version exists in the linked forum post.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 4 months ago #240588 by Joffm
Hi,
you can think of adapting the "Interest Points" question theme to your needs,

And to insert code, you may use the button  
And you can add the type by adding
code type=javascript
code type=css

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • TomPH01
  • TomPH01's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 4 months ago #240592 by TomPH01
Hi,

Sorry, I'm not sure I understand. Are you advising me on how to clean up the forum post? What do you mean by adapting the "interest points" theme?

I have tried adding type = ... to the code tag and that has not changed the formatting, unfortunately.

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose