Welcome to the LimeSurvey Community Forum

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

Recording Respondent Device Type

  • Winocll_48635
  • Winocll_48635's Avatar Topic Author
  • Offline
  • Banned
  • Banned
More
7 years 5 months ago #144718 by Winocll_48635
Recording Respondent Device Type was created by Winocll_48635
I've searched around and can't find anything specific on this...I'm looking for a way to automatically generate data into a hidden survey question that would show whether the respondent is taking the survey on a mobile, desktop, etc. device.
Any ideas?
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 5 months ago #144723 by DenisChenu
Replied by DenisChenu on topic Recording Respondent Device Type

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 following user(s) said Thank You: Winocll_48635
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 5 months ago #144745 by tpartner
Replied by tpartner on topic Recording Respondent Device Type
There is a JavaScript approach here - www.limesurvey.org/community-services/fo...th-limesurvey#113041

I would use the following for browser width and height:

Code:
var vpw = $(window).width())
var vph = $(window).height()

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: Winocll_48635
The topic has been locked.
  • Winocll_48635
  • Winocll_48635's Avatar Topic Author
  • Offline
  • Banned
  • Banned
More
7 years 5 months ago #144806 by Winocll_48635
Replied by Winocll_48635 on topic Recording Respondent Device Type
It's not saving to my data file.
I put the script into the 'source' question text of a long-text question type...then i hide the question..it's the first question of the test survey. When i run the survey the data for that scripted question is blank.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 5 months ago #144809 by tpartner
Replied by tpartner on topic Recording Respondent Device Type
Don't hide the question with the advanced setting. It will be hidden by t he JavaScript.

You cannot use JavaScript in questions hidden with the advanced setting.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: Winocll_48635
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 5 months ago #144826 by DenisChenu
Replied by DenisChenu on topic Recording Respondent Device Type

tpartner wrote: Don't hide the question with the advanced setting. It will be hidden by t he JavaScript.

You cannot use JavaScript in questions hidden with the advanced setting.

Or add 'hidden' class to CSS class :)

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 following user(s) said Thank You: Winocll_48635
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 5 months ago #144852 by tpartner
Replied by tpartner on topic Recording Respondent Device Type
@DenisChenu, yes, good tip.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • Winocll_48635
  • Winocll_48635's Avatar Topic Author
  • Offline
  • Banned
  • Banned
More
7 years 5 months ago #144883 by Winocll_48635
Replied by Winocll_48635 on topic Recording Respondent Device Type
That did it..thanks so much, guys...huge help!
The topic has been locked.
  • Winocll_48635
  • Winocll_48635's Avatar Topic Author
  • Offline
  • Banned
  • Banned
More
7 years 4 months ago #145327 by Winocll_48635
Replied by Winocll_48635 on topic Recording Respondent Device Type
ok...so it did work, but only if the survey is presented 'group by group'. When i set the survey to present itself in the 'question by question' format it is not hidden. Here is the image of what the 'hidden' script ends up looking like when taking the survey in a 'question by question' format...
The topic has been locked.
  • Winocll_48635
  • Winocll_48635's Avatar Topic Author
  • Offline
  • Banned
  • Banned
More
7 years 4 months ago #145339 by Winocll_48635
Replied by Winocll_48635 on topic Recording Respondent Device Type
Figured it out...
When doing question-by-question format you need to add a line to the script that auto-advances to the next question. I used...
Code:
$("#movenextbtn,#movesubmitbtn").delay(0).click();
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 4 months ago #145346 by DenisChenu
Replied by DenisChenu on topic Recording Respondent Device Type

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