Welcome to the LimeSurvey Community Forum

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

Is Limesurvey able to detect the used device?

More
2 years 11 months ago - 2 years 11 months ago #215070 by jelo

I guess that what Denis is working on will be more robust.

Not sure what he is working on. Expanding the plugin.

The typical approach of other survey tools is to provide a function to the logic (e.g IsMoble).
The feature request for LimeSurvey would be to add a ExpressionScript function IsMobile.

Personally I would like to see a more flexible function, since the definition of what a mobile vs. desktop view is, can differ over time.
It's often only about the viewport and screen. A notebook often has a lower resolution than a smartphone. So a function in ExpressionScript with a viewport/screen estate check (e.g Width/Height).

You still have the JavaScriptcode somewhere. Perhaps a flexible approach would be to have a variable screen, where you could define not only URL mapping, but could enter JavaScript or predefined scripts and assign them to a variable.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Last edit: 2 years 11 months ago by jelo.

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 11 months ago #215075 by DenisChenu
Replied by DenisChenu on topic Is Limesurvey able to detect the used device?

The typical approach of other survey tools is to provide a function to the logic (e.g IsMoble).
The feature request for LimeSurvey would be to add a ExpressionScript function IsMobile.

 
Possible in 4.X via plugin, not before (sample : github.com/LimeSurvey/LimeSurvey/tree/ma...expressionFixedDbVar )
Before : to have a value in ExpressionManager : you need a question.

Currently : i update Browser + add isMobile and isTablet optionnal question code globally.

I didn't make a question settings for this. Because current one work on 3.X and in 4.X and after : better to have new variables like you say : isMobile etc …

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.

Please Log in to join the conversation.

More
2 years 11 months ago #215076 by jelo
If anyone wants to dig a bit deeper about mobile screens, a look at
www.mydevice.io/#compare-devices can help.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Please Log in to join the conversation.

  • tammo
  • tammo's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
2 years 11 months ago #215077 by tammo

You still have the JavaScriptcode somewhere. Perhaps a flexible approach would be to have a variable screen, where you could define not only URL mapping, but could enter JavaScript or predefined scripts and assign them to a variable.

Could you please explain what you mean here? I do not understand. Trying hard...

Tammo


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl

Please Log in to join the conversation.

More
2 years 11 months ago #215078 by jelo
That is a thought about a feature request.
To prevent further confusion let's wait till you have the "more robust" approach at your fingertips and then compare the different solutions.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 11 months ago #215081 by DenisChenu
Replied by DenisChenu on topic Is Limesurvey able to detect the used device?
It's not mire robust : since there are no real securtity issue : i don't think you need a PHP solution.

But with a PHP solution : you can (i think ) have whole group separation, use variable in 1st page etc …


About a variable for screen size : you mean the real screen size or the current screen size.

And with zoom or without zoom ?

etc etc …

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.

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 11 months ago #215099 by DenisChenu
Replied by DenisChenu on topic Is Limesurvey able to detect the used device?
All done
gitlab.com/SondagesPro/QuestionSettingsType/findUserAgentInfo

(need to create a plugin topic here)

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: tpartner

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 11 months ago #215143 by tpartner
Replied by tpartner on topic Is Limesurvey able to detect the used device?
Nice!

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
2 years 1 month ago #225130 by Surveylab_KN
Replied by Surveylab_KN on topic Is Limesurvey able to detect the used device?
Hi Joffm,

this is a very nice solution to save the information about the device. Unfortunately, I am not able to adapt your adaptions for the multiple short text question (the one with the long free text works fine). I used a multiple short text question, replaced the part of the code and added 3 subquestions. But the text fields are still empty. Do I need to change something else.

I am using Version 5.2.10+220118.

Please Log in to join the conversation.

  • tammo
  • tammo's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
2 years 1 month ago - 2 years 1 month ago #225133 by tammo
See attached the question (wrapped in an English survey), made up using the ideas of Joffm and before him Christian Ludwig (as shown in the Javascript),
 


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Last edit: 2 years 1 month ago by tammo.
The following user(s) said Thank You: Surveylab_KN

Please Log in to join the conversation.

More
1 year 4 months ago #233855 by Masalas
Replied by Masalas on topic Is Limesurvey able to detect the used device?
Can anyone please check whether this is still working for him/her? For me, it simply displays (as question text) the qid followed by the commands that should paste the gathered info. Tried the original long text as well as @tammo |s version (where I imported the whole survey, then exported the single question, replaced all the en-language codes to my survey language in the lsq file and imported into my survey).

Looks like this:
 

Please Log in to join the conversation.

More
1 year 4 months ago #233856 by jelo

Can anyone please check whether this is still working for him/her?
 
Please provide a LSS export. Not sure anyone will retype your JS from an image to check it.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose