- Posts: 74
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Recording Respondent Device Type
- Winocll_48635
- Topic Author
- Offline
- Banned
Less
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?
Any ideas?
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13637
- Thank you received: 2491
7 years 5 months ago #144723
by DenisChenu
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.
Replied by DenisChenu on topic Recording Respondent Device Type
Hi,
git.framasoft.org/SondagePro-LimeSurvey-...in/findUserAgentInfo BUT :
contribution are welcome : git.framasoft.org/SondagePro-LimeSurvey-...erAgentInfo.php#L229
git.framasoft.org/SondagePro-LimeSurvey-...in/findUserAgentInfo BUT :
contribution are welcome : git.framasoft.org/SondagePro-LimeSurvey-...erAgentInfo.php#L229
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10108
- Thank you received: 3593
7 years 5 months ago #144745
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
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:
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
- Topic Author
- Offline
- Banned
Less
More
- Posts: 74
- Thank you received: 1
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.
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10108
- Thank you received: 3593
7 years 5 months ago #144809
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
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.
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13637
- Thank you received: 2491
7 years 5 months ago #144826
by DenisChenu
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.
Replied by DenisChenu on topic Recording Respondent Device Type
Or add 'hidden' class to CSS classtpartner 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.
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10108
- Thank you received: 3593
7 years 5 months ago #144852
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
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
- Topic Author
- Offline
- Banned
Less
More
- Posts: 74
- Thank you received: 1
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
- Topic Author
- Offline
- Banned
Less
More
- Posts: 74
- Thank you received: 1
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...
Attachments:
The topic has been locked.
- Winocll_48635
- Topic Author
- Offline
- Banned
Less
More
- Posts: 74
- Thank you received: 1
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...
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13637
- Thank you received: 2491
7 years 4 months ago #145346
by DenisChenu
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.
Replied by DenisChenu on topic Recording Respondent Device Type
Don't need javascriptDenisChenu wrote: Hi,
git.framasoft.org/SondagePro-LimeSurvey-...in/findUserAgentInfo BUT :
contribution are welcome : git.framasoft.org/SondagePro-LimeSurvey-...erAgentInfo.php#L229
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.