Welcome to the LimeSurvey Community Forum

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

iPhone (IOS) Array with dropdown issues

  • marcgold
  • marcgold's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
3 years 10 months ago #200683 by marcgold
iPhone (IOS) Array with dropdown issues was created by marcgold
Have a really annoying issue wondered if anyone has a suggestion on how to resolve. This only happens on iPhone IOS. We have tried this on iPhone 8, 11, X & SE and the problem is persistent. Tried this on both safari and Chrome and the same issue.

We have an array question, with the Options set as drop down.

Some of the options are quite long, but important, however because IOS provides a overly list when it sees dropdown lists, it will only display this on one line - no word wrap in the options.





The text is quite important, and I would rather use the dropdown option. Otherwise the text is too long for standard screens and looks messy.

Thanks in advance.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 10 months ago #200698 by holch
Replied by holch on topic iPhone (IOS) Array with dropdown issues
I don't think there is a solution in Limesurvey, because this is obviously a browser behaviour as you describe it. I assume that this happens whenever there is a dropdown in a website?

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.
  • marcgold
  • marcgold's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
3 years 10 months ago #200701 by marcgold
Replied by marcgold on topic iPhone (IOS) Array with dropdown issues
Hi Holch

Your right it is specific to iPhone and is the way they handle drop downs. Im amazed that I haven't seen this before, or maybe my dropdowns have just been a lot shorter.

I was hoping that there was some type of overide to stop that from happening.

My only solution was to remove the dropdown, but it does make it a bit messy on desktop, but then 70% of responses are on mobile.

Thanks anyway.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 10 months ago #200705 by holch
Replied by holch on topic iPhone (IOS) Array with dropdown issues
Maybe someone knows a solution, but if this is the standard behaviour of iOS, I think there is not much of a chance.

But I think you are probably better off asking in a forum that covers web development for Safari on iOS.

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.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 10 months ago - 3 years 10 months ago #200714 by tpartner
Replied by tpartner on topic iPhone (IOS) Array with dropdown issues
A hack that I use is to insert an <optgroup> element into the <select> (drop-down) via JavaScript.

Something like this in the question source (this could also be placed in the survey theme custom.js file or in a custom question theme):

Code:
<script type="text/javascript" charset="utf-8">  
  $(document).on('ready pjax:scriptcomplete',function(){
    $('#question{QID} select.form-control').prepend('<optgroup label=""></optgroup>');
    });
</script>



Sample survey attached:

File Attachment:

File Name: limesurvey...9116.lss
File Size:15 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 3 years 10 months ago by tpartner.
The following user(s) said Thank You: holch
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose